Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Really odd crash problem


2 replies to this topic

nstohlma

nstohlma
  • Members
  • 2 posts

Posted 21 January 2003 - 22:46

I'm having some odd issues with some code that I'm working on to get the UNC from a mapped drive using the WNetGetUniversalName API call in NT/2K/XP.

I don't think the problem is actually with that API call, but possibly from the method that I'm using to get the returned string from the buffer.

The odd part is that the function that is doing all of the API calls appears to be returning okay, except that as soon as the function is complete the installer just quits. I've watched it through the debugger a few times and every time, as soon as the return function is called (or comment the return function and process end statement for the function) the installer quits.

The really odd part is that whatever folder has been specified in the Destination directory dialog is then _created_ for some bizarre reason.

I thought it might be that I was using the ANSI versions of the API for some reason, but when I built a UNICODE version the problem happens exactly the same. Has anyone ever seen anything like this?

You can get a zip file of the code at http://www.cavort.or...blemscripts.zip

Thanks much for any ideas.

(I also posted this over on the InstallShield forums. Hopefully someone will have some ideas, I've been beating my head on this a bit too long.)



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 January 2003 - 19:06

Does your prototype include the correct calling convention (cdecl or stdcall)?

nstohlma

nstohlma
  • Members
  • 2 posts

Posted 27 January 2003 - 15:07

Thanks for the reply, I'll have to look into that later today.

I did end up sending in a support request to Installshield (after finally convincing my boss that a support contract might be a good idea) who pointed out a knowledgebase article that solved the problem using a different API call.

I must have either used the wrong search terms or be completely blind to have missed it when I was looking in there before I posted this topic.

Anyway, for a simpler, and working (!;) solution to getting UNCs for a mapped path Q106287 has it spelled out.