Windows API to unload a library - window

I have written and application and it loads a dll using AfxLoadLibrary and i want to unload this library memory when there is no use of it.
Is there any windows API to unload a library?

This one should do it.
BOOL AFXAPI AfxFreeLibrary(HINSTANCE hInstLib);
These functions are part of the MFC library. The pure Windows API equivalents would be LoadLibrary and FreeLibrary.

Yes, use AfxFreeLibrary

Related

System.windows.forms.tlb

in the windows SDK there is this file residing in the Lib-directory. Is it possible to use this file with VB6? Google found nothing about it.
If not, in which language (Excep c++) can I use it?
resp. for what is it good for (yes, I know .net winforms)
Thanks regards
Oops
That file provides the COM interface information for the .NET objects that are exposed via COM interop. You can't use it directly, as it only provides the interface information.

Call and Execute a Function on a DLL using VBScript

My target DLL file is Microsoft DirectInput dll file which is located here:
C:\Windows\System32\Dinput.dll
I have monitored an application which uses it for API. I just see that it has call for "DirectInputCreateEx" on Dinput.dll and I did not found any other useful information.
Now I want to call and execute "DirectInputCreateEx" on Dinput.dll using VBScript.
Is this possible? How?
You could only do this (possibly) if it was a COM object. VBScript does not support calling normal API functions.
You can get around this by creating a COM wrapper for it in C++ or similar language.

Calling winapi export function from javascript?

I want to call DLL export function defined in C++ win32 DLL from javascript/HTML control at client side in browser.
Thanks,
Naeem
You can't due to security and compatibility reasons.
What you can do is to wrap the DLL into an ActiveX control, mark it safe for scripting and then call it. Of course ActiveX isn't compatible with all browsers or operating systems but that might not be an issue in your setup.

Using WINAPI in Qt applications

Can anybody tell if I can use the Windows APIs in my qt application?
If yes can anybody tell me the procedure to do it? I need to use the msdn winapi "GetSystemPowerStatus" in my qt application to show the battery status in my qt GUI based application.
Yes, you can use those APIs (generally speaking), by including the appropriate header files.
It will make your code platform-specific (non-portable), so if there is a cross-platform way of doing so, I would use that.

Managed to Native Interop on Windows Azure NO P/Invoke

Does Azure allow managed to native interop without the use of P/Invoke. I have a c header file and dll which I plan to wrap in a managed c++ dll, and then wrap that in a c# wrapper for ease of use.
Anyways, the header file is to complicated to use with P/Invoke, and its much easier to use the managed c++ wrapper, however I don't know if this is possible to do in Azure or any other cloud platform such as EC2 ?
Any ideas ?
Azure does allow native calls, check on this link
But it has to be 64 bit only.

Resources