Mirek H2o Posted January 31, 2006 Share Posted January 31, 2006 Hi people, Does somebode know the source code(C++, assembler or Pascal) of DllCall function ?I need it in my application.Thx Link to comment Share on other sites More sharing options...
w0uter Posted January 31, 2006 Share Posted January 31, 2006 look @ loadlibrary & getprocadress My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 2, 2006 Share Posted February 2, 2006 Actual Microsoft example expandcollapse popup// File: RUNTIME.C // A simple program that uses LoadLibrary and // GetProcAddress to access myPuts from MYPUTS.DLL. #include <stdio.h> #include <windows.h> typedef VOID (*MYPROC)(LPTSTR); VOID main(VOID) { HINSTANCE hinstLib; MYPROC ProcAdd; BOOL fFreeResult, fRunTimeLinkSuccess = FALSE; // Get a handle to the DLL module. hinstLib = LoadLibrary("myputs"); // If the handle is valid, try to get the function address. if (hinstLib != NULL) { ProcAdd = (MYPROC) GetProcAddress(hinstLib, "myPuts"); // If the function address is valid, call the function. if (fRunTimeLinkSuccess = (ProcAdd != NULL)) (ProcAdd) ("message via DLL function\n"); // Free the DLL module. fFreeResult = FreeLibrary(hinstLib); } // If unable to call the DLL function, use an alternative. if (! fRunTimeLinkSuccess) printf("message via alternative method\n"); } Link to comment Share on other sites More sharing options...
erifash Posted March 21, 2006 Share Posted March 21, 2006 I am very interested in this as I have been learning C++ for a couple of weeks now. Using the code above, how could you dynamically load a function from a dll, with or without parameters, like AutoIt does? My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
Valik Posted March 21, 2006 Share Posted March 21, 2006 A couple weeks? In 6 - 12 months, come back to Windows programming in general. Another 2-3 months after that take a look at DLLs. Crawling before you walk, walking before you run and all that. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now