|
-
April 6th, 1999, 07:49 AM
#1
How to call a function by a pointer to that function?
In C++, I can call a function in dll like this:
hModule = LoadLibrary(szDllName);
pfnProc = (FARPROC*)GetProcAddress(hModule, szProcName)
pfnProc();
But in vb, can I call a function like above.(through a function pointer from a GetProcAddress call.)
-
April 6th, 1999, 08:47 AM
#2
Re: How to call a function by a pointer to that function?
in VB you can use the AddressOf operator to retrieve the address of a VB sub or function. You cannot call that function as in C, but you can pass the address to an API function that takes a function address as a parameter. This is usually done in subclassing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|