DLL problems with OI7.01 (OpenInsight 32-Bit)
At 09 AUG 2004 11:42:38AM Bertil Strom wrote:
I have a number of DLLs handling soundfiles generated by Philips Speechmike Digital recording system. My application sets the filename and saves the wav files by calling these DLLs. It worked well with 4.13 but since I upgraded to OI7 the DLL (SNAPI32_OpenSoundfile) which is opening the soundfile doesn't work, but the others does !
Anyone got any idea ?
At 09 AUG 2004 12:09PM Sean FitzSimons wrote:
Bertil,
Have you run DECLARE_FCNS against the dll declaration?
Sean
=== At 09 AUG 2004 12:32PM The Sprezzatura Group wrote: ===
Bertil
How have you prototyped the function? There was a difference in the way LPCHAR declarations work from 4.13 -] 7.01
If you've used LPCHAR remember to add the trailing Char(0), or alternatively use the LPSTR instead.
Regards
World leaders in all things RevSoft
At 09 AUG 2004 01:06PM Bertil Strom wrote:
I have run the declare_fcns i the sysprog account.
My prototype DLL_SNAPI32 looks like this.
SNAPI32
LONG STDCALL SNAPI32_Login(LPLONG, LPCHAR);
LONG STDCALL SNAPI32_Logout(LPLONG);
*LONG STDCALL SNAPI32_GetActualUserProfile(LPVOID, LPUSERDATA);
*LONG STDCALL SNAPI32_SetActualUserProfile(LPVOID, LPUSERDATA);
LONG STDCALL SNAPI32_SetActualFullUsername(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_SetActualUserID(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_SetActualWorktype(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_SetActualApplication(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_FillWorktypeList(LPVOID, LPCHAR, UINT);
LONG STDCALL SNAPI32_FillApplicationList(LPVOID, LPCHAR, UINT);
LONG STDCALL SNAPI32_GetActualTempPath(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_SetActualTempPath(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_GetActualSavePath(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_SetActualSavePath(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_SetActualSFName(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_SetEventHandler(LPVOID, LPCHAR, LPCHAR);
LONG STDCALL SNAPI32_AddMenuItem(LPVOID, UINT, UINT, LPSHORT, LPCHAR);
LONG STDCALL SNAPI32_ChangeMenuItem(LPVOID, UINT, UINT, LPCHAR);
LONG STDCALL SNAPI32_RemoveMenuItem(LPVOID, UINT);
LONG STDCALL SNAPI32_GetActualJobData(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_SetActualReferenceID(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_SetActualComment(LPVOID, LPCHAR);
LONG STDCALL SNAPI32_OpenSoundFile(LPVOID, LPCHAR); (=the problem)
LONG STDCALL SNAPI32_ChangeWindowTitle(LPVOID, UINT);
LONG STDCALL SNAPI32_DisableSaveWindow(LPVOID, UINT);
LONG STDCALL SNAPI32_PlaySoundFile(LPVOID, LPCHAR, LONG, LONG);
LONG STDCALL SNAPI32_GetOperatingMode(LPVOID, LPSHORT);
LONG STDCALL SNAPI32_GetUIModule(LPVOID, LPSHORT);
LONG STDCALL SNAPI32_GetUIOperationMode(LPVOID, LPSHORT);
LONG STDCALL SNAPI32_KillApplication(LPVOID, UINT);
LONG STDCALL SNAPI32_LaunchUI(LPVOID, UINT, UINT, UINT, UINT);
LONG STDCALL SNAPI32_SetUIState(LPVOID, UINT);
LONG STDCALL SNAPI32_GetUIState(LPVOID, LPSHORT);
LONG STDCALL SNAPI32_StopSoundFile(LPVOID);
LONG STDCALL SNAPI32_CloseSoundFile(LPVOID, UINT);
LONG STDCALL SNAPI32_API32_Login(LPVOID, LPCHAR);
Should I add char(0) within the brackets ?
Thanks
Bertil
At 09 AUG 2004 01:21PM [email protected] wrote:
No add it in your code or reprototype…
so
Var := \00\
if not reprototyped and call the routine as before.
Or reprototype and don't change your code.
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
At 10 AUG 2004 02:32AM [email protected] wrote:
Just so I get this right ..
I can change LPCHAR to LPSTR and this will allow me to use existing code without adding the ':char(0)'
Yes?
Phone: 971-570-2005
At 10 AUG 2004 04:25AM Bertil Strom wrote:
You solved my problem. Adding the char(0) to the variable made it work. Any other changes to declarations in the OI7 ?
Thanks
Bertil
At 10 AUG 2004 06:00AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Not changes as such. Just some additions which are basically designed to help more when running in OI's UTF8 mode.
SRPCS have a list on their website here.
World leaders in all things RevSoft
At 10 AUG 2004 06:01AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Yes.
World leaders in all things RevSoft
At 10 AUG 2004 08:13AM Steve Smith wrote:
Some dll functions require a \0000\ on the end of strings for the prototyping to work ok.
Just so you know *when* to handle it yourself.
I think you may have some old "emu code" kicking around which does this
Steve