Calling LHA32.DLL
Posted: Sat Jun 27, 2009 1:32 am
I"m trying to figure out how to access the unlha function of the LHA32.DLL file from Fivewin/Harbour. In C#, the code below works just fine to access the unlha function of the library. I'm wondering if someone could help me out with the call in Harbour in terms of the way the function assigns the variables.
[DllImport("UNLHA32", CharSet = CharSet.Ansi)]
public static extern long Unlha(IntPtr hwnd, string szCmdLine, StringBuilder SzOutput, int dwSize); /// <summary>
I defined the function below in Harbour but I've got something wrong and it does absolutely nothing. I'm not sure how to define an intPtr in harbour or an INT for that matter.
hUnLhaDll := loadlibrary(u_home_dir + "\UNLHA32.DLL")
DLL32 FUNCTION UnLha(hIntPtr AS LONG,szCmdLine as LPSTR,szOutPut as LPSTR,dwSize as LONG) AS LONG PASCAL LIB "UNLHA32.DLL"
When I call the function it doesn't complain, it simply doesn't do anything at all. I'm guessing it's the use of a LONG but I'm not sure how that translates into harbour.
[DllImport("UNLHA32", CharSet = CharSet.Ansi)]
public static extern long Unlha(IntPtr hwnd, string szCmdLine, StringBuilder SzOutput, int dwSize); /// <summary>
I defined the function below in Harbour but I've got something wrong and it does absolutely nothing. I'm not sure how to define an intPtr in harbour or an INT for that matter.
hUnLhaDll := loadlibrary(u_home_dir + "\UNLHA32.DLL")
DLL32 FUNCTION UnLha(hIntPtr AS LONG,szCmdLine as LPSTR,szOutPut as LPSTR,dwSize as LONG) AS LONG PASCAL LIB "UNLHA32.DLL"
When I call the function it doesn't complain, it simply doesn't do anything at all. I'm guessing it's the use of a LONG but I'm not sure how that translates into harbour.