Archive: need help with dll


need help with dll
Hi

I wrote an external dll that checks for NTFS file system and changes the security permissions for files and folders(under win XP,NT,2000).

evrey thing looks fine and works fine on all windows versions except win98 . i use the MUI and on the MUI_CUSTOMFUNCTION_DIRECTORY_LEAVE i check the drive for file system :

SetOutPath "$PLUGINSDIR"
File "..\..\..\nsis\projects\TakeOwnership\TakeOwnership.dll"
strcpy $3 $INSTDIR 3
System::Call '$PLUGINSDIR\TakeOwnership.dll::IsNTFS(t "$3") i .r4'

using the dll on win98 causes the setup to crash , not after calling the dll but after exiting the event. after this event call i go directly to the install file windows , if i use the same code in another event like MUI_CUSTOMFUNCTION_INSTFILES_PRE
i get the same result . if use the code within the copy section the setup crash when it reaches SetShellVarContext all(???) .

Does anybody have any pointers for we , how do i work around this problem ?

I used BCB5(Borland C++ Builder) to build the dll , working on winXP.


First try to convert this DLL to a real NSIS plug-in (see Contrib\ExDLL). That way we can be sure this crash has nothing to do with the System plug-in.


if it's win98 that you're getting issues with then it could be a memory issue in your dll.

i'm saying that because the majority of my bcb programs would run fine on NT/2000 machines but under 98 they would bork due to issues with buffer sizes, etc that the NT/2000 OSes deal better with.

just my experience on things and may be of help

-daz