ImmortAlex
2nd March 2005 11:58 UTC
Problem with System::Call under WinXP SP1
I have a very strange problem with System plugin.
My installer use my own DLL to validate serial number by calling some functions with System::Call. All works fine everywhere, in any Windows I can reach, except Windows XP SP1 (tested on 4 different machine).
Investigating this problem I find, that it doesn't work when I unpack my DLL into $PLUGINSDIR, but work from any other place.
Very strange bug... What was broken in XP SP1?
Joel
2nd March 2005 14:14 UTC
Did you try InitPluginsDir before using $PLUGINSDIR?
ImmortAlex
3rd March 2005 02:43 UTC
Of course! There are a lot of files that I need in this folder (plugins, InstallOptions' INIs), and they all are there. Moreover IfFileExists shows that my DLL is in $PLUGINSDIR, but System::Call doesn't call functions from it.
I even wrote very simple DLL in BC++, consists of one function displaying MessageBox, and I can't call this function in XP SP1 ! In any other OS (XP SP2, 2K SP4 for example) all works fine. And it works from $SYSDIR.
I'm trying to recompile System plugin in BC++, but have no luck, so I can't debug this situation.
ImmortAlex
3rd March 2005 05:04 UTC
Seems like I have solved this problem.
Reading appendix D.4 of manual I found that "you have to change the output directory to that where the DLL you want to use is". While I wrote full path to my DLL like
System::Call "$PLUGINSDIR\my.dll::func()"
It's strange, but the only one OS where it doesn't work was XP SP1...
Takhir
3rd March 2005 11:15 UTC
SetOutPath "$PLUGINSDIR"
might also help
ImmortAlex
3rd March 2005 11:19 UTC
My previous post is about it. May be I was very short? :)
Yes, I solve the problem with SetOutPath.