Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4277113 - 07/08/16 08:42 AM LoadLibrary  
Joined: May 2006
Posts: 123
DarKcyde Offline
Member
DarKcyde  Offline
Member

Joined: May 2006
Posts: 123
I'm trying to link Target with a dll (because reasons yep), but nothing I try works.

Code:
	int dll = LoadLibrary("vXboxInterface.dll"); //C:\\bin\\vXbox\\vXboxInterface.dll
	printf("DLL address: %d\xa",dll);

	if (!dll) {
		printf("Failed loading vXboxInterface.dll, file not found.\xa"); 
		return 1;
	}
	else printf("Loaded vXboxInterface.dll\xa");


If I put Kernel32.dll in there, it loads fine, I can see the address printed out. This dll won't load though. I tried specifying a full path, I put the folder into windows PATH, I moved the dll to a nice simple path with no spaces, I copied the dll into the Target folder, Target\x64 folder, Target\Plugins. Nothing. I even tried putting it in Windows\System32. It's like the dll isn't there.

banghead

Inline advert (2nd and 3rd post)

#4277180 - 07/08/16 12:56 PM Re: LoadLibrary [Re: DarKcyde]  
Joined: Oct 2010
Posts: 83
Nicu Offline
Junior Member
Nicu  Offline
Junior Member

Joined: Oct 2010
Posts: 83
Maybe because your DLL is a 64bit one, and the TARGET script interpreter is 32bit.
Try loading tye 32bit version of the dll (if you have it).

#4277247 - 07/08/16 02:39 PM Re: LoadLibrary [Re: DarKcyde]  
Joined: May 2006
Posts: 123
DarKcyde Offline
Member
DarKcyde  Offline
Member

Joined: May 2006
Posts: 123
OMG. That was so simple. Seeing as target had x64 processes, it never occurred to me that the interpreter might be 32bit. I was using the 64bit dll. Switched to 32bit dll, it WORKS!

Thanks so much Nicu! smile

Now to debug all my mistakes! Lol.


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Actors portraying US Presidents
by PanzerMeyer. 04/19/24 12:19 PM
Dickey Betts was 80
by Rick_Rawlings. 04/19/24 01:11 AM
Exodus
by RedOneAlpha. 04/18/24 05:46 PM
Grumman Wildcat unique landing gear
by Coot. 04/17/24 03:54 PM
Peter Higgs was 94
by Rick_Rawlings. 04/17/24 12:28 AM
Whitey Herzog was 92
by F4UDash4. 04/16/24 04:41 PM
Anyone can tell me what this is?
by NoFlyBoy. 04/16/24 04:10 PM
10 Years ago MV Sewol
by wormfood. 04/15/24 08:25 PM
Pride Of Jenni race win
by NoFlyBoy. 04/15/24 12:22 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0