hi, im developing an application that uses mswinsock and the two .DLLs it needs to run, because im using an installer program, it keeps the two DLLs in the same place as the program but when i start the program from the desktop shortcut, it tries to find the two DLLs from the desktop instead of where the actual program is, is there any way i can fix this, any help on resolving this will be greatly appriciated, thanks.

Hi Webbsta,

It depends on how you've linked to the .dlls. I know practically nothing about linking to such files but I do know you can find the installation location of your app (and point to it from code) quite easily.

Just create a string variable wherever you want to call it (I use Private AppPath as string in the form header, but it's entirely up to you) and then set it to: My.Application.Info.DirectoryPath - you can then reference any other files/folders in the same location as AppPath & "\...."

HTH

Chris147.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.