Where can I get documentation ?
Where can I get documentation ?
There are two ways to use a DLL:
In order to use static linking you have to create an import library from the DLL. You can use libdef.exe or libimp.exe:
impdef.exe mydll.def mydll.dll
or
implib.exe mydll.lib mydll.dll
implib.exe will create the lib. impdef.exe will create a def file (ascii file) and then you can create the lib from it.
Then you create a C function that calls the DLL C function and link the import library.
HB_FUNC( THE_FUNCTION_TO_CALL )
{
TheCalledCfunction();
}
From your app:
The_Function_to_Call()
There is no need to create an import library. The DLL is loaded at rutime and unloaded once it is used. FWH provides the following command to use the functions from the DLL:
DLL FUNCTION FuncionName( param AS TYPE ) AS RESULT_TYPE FROM FunctionName LIB DLLName
in example:
DLL FUNCTION Shell_NotifyIcon( nMsg AS LONG, pNID AS LPSTR ) AS BOOL PASCAL ;
FROM "Shell_NotifyIconA" LIB "shell32.dll"
DLL FUNCTION Shell_NotifyIcon( nMsg AS LONG, pNID AS LPSTR ) AS BOOL PASCAL ;
FROM "Shell_NotifyIconA" LIB "shell32.dll"
Thats a FWH command, are you using #include "FiveWin.ch" ?
Antonio Linares wrote:Thats a FWH command, are you using #include "FiveWin.ch" ?
Hi Antonio,
Is it possible to use dll that is created c# .net platform?
Thanks
mosh1 wrote:DLL FUNCTION Shell_NotifyIcon( nMsg AS LONG, pNID AS LPSTR ) AS BOOL PASCAL ;
FROM "Shell_NotifyIconA" LIB "shell32.dll"
Antonio Linares wrote:Hakan,
Windows API function Shell_NotifyIcon() expects different parameters:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762159%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
You can not call it providing it a string
Why don't you use Msgwait() ?
You can change its source code to place it where you want
Antonio Linares wrote:Why don't you use Msgwait() ?
You can change its source code to place it where you want
Do you want it just for Windows 10 ?
Antonio Linares wrote:Do you want it just for Windows 10 ?
So better implement your own version that will work on all Windows versions ![]()