| View previous topic :: View next topic |
| Author |
Message |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Tue Jun 10, 2008 5:36 pm Post subject: linking error |
|
|
I'm trying to compile a hooking dll, that I've already made. But I was editing somethings, compiled and I got a linking error. I then replaced the code with the original code and I still got the error. I even made a new project and got the error. Anyway here it is, two warnings, one error.
| Quote: |
------ Build started: Project: apihook, Configuration: Debug Win32 ------
Compiling...
cl : Command line warning D4002 : ignoring unknown option '/errorReport:prompt'
cl : Command line warning D4024 : unrecognized source file type 'ÿ_/', object file assumed
LINK : fatal error LNK1181: cannot open input file ' ■/.obj'
Build log was saved at "file://c:\Documents and Settings\OIB\My Documents\Visual Studio 2008\Projects\apihook\apihook\Debug\BuildLog.htm"
apihook - 1 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Tue Jun 10, 2008 5:39 pm Post subject: |
|
|
| Unicode file names?
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Tue Jun 10, 2008 5:55 pm Post subject: |
|
|
| noz3001 wrote: | | Unicode file names? |
What?
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Tue Jun 10, 2008 6:51 pm Post subject: |
|
|
He's talking about the
' ■/.obj'
the little black block is a UNICODE character.
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Tue Jun 10, 2008 6:53 pm Post subject: |
|
|
| lurc wrote: | He's talking about the
' ■/.obj'
the little black block is a UNICODE character. |
Ok. But I'm not doing anything in UNICODE, at all.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Tue Jun 10, 2008 6:56 pm Post subject: |
|
|
Post Source ??
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Tue Jun 10, 2008 7:15 pm Post subject: |
|
|
| Code: |
BOOL APIHOOK(LPCSTR DllName, LPCSTR API, DWORD Replace) {
DWORD AddressToHook = (DWORD)GetProcAddress(LoadLibrary(DllName), API);
BYTE *ATH = (BYTE*)AddressToHook;
Byte *ATU = (BYTE*)Replace;
VirtualProtect((LPVOID)AddressToHook, 5, PAGE_EXECUTE_READWRITE, NULL);
*ATH++ = 0xE9;
*(signed int*)ATH = ATU-(ATH+4);
VirtualProtect((LPVOID)AddressToHook, 5, PAGE_EXECUTE, NULL);
FlushInstructionCache(GetCurrentProcess(), NULL, NULL);
return TRUE;
}
|
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Tue Jun 10, 2008 7:26 pm Post subject: |
|
|
If you keep on getting the error even with reverting to the old source....Then it must be something with the program, correct?
I dunno, im still in the process of learning C++ but....
im sure you tried this already......
1. Clean it?
2. Rebuild it?
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Tue Jun 10, 2008 7:33 pm Post subject: |
|
|
You made a brand-new project and it wouldn't compile? Sounds like you messed something up int he options.
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Tue Jun 10, 2008 8:00 pm Post subject: |
|
|
I'll check.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Tue Jun 10, 2008 11:07 pm Post subject: |
|
|
This doesn't actually have anything to do with the error you are talking about, but GetProcAddress() doesn't have a Unicode variant, and therefore you should always pass an ASCII string to it in the second parameter.
Also, clean up that code; there are useless variables floating around everywhere in it.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Jun 11, 2008 12:23 am Post subject: |
|
|
According to the MSDN this is due to invalid directory settings in your IDE. Various users mentioned having previous versions of other compilers installed and Visual Studio 2008 was using an incorrect linker.exe when compiling.
Adjust your directories to be sure to include the proper location for the new linker to be used with 2008.
_________________
- Retired. |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Wed Jun 11, 2008 9:02 am Post subject: |
|
|
| Flyte wrote: |
Also, clean up that code; there are useless variables floating around everywhere in it. |
Such as?
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Ferocious Advanced Cheater
Reputation: 0
Joined: 06 Feb 2008 Posts: 54
|
Posted: Wed Jun 11, 2008 9:05 am Post subject: |
|
|
i dont think it has to do anything with the source, because i could compile that without any problem.
_________________
I wanna hack, but I don't know how...
Last edited by Ferocious on Wed Jun 11, 2008 9:14 am; edited 1 time in total |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Wed Jun 11, 2008 9:14 am Post subject: |
|
|
Lol, yeah it is Ferocious. I had to take out so many useless things in there, and I wondered, why are these even here, you're not doing anything xD
@Wiccaan
Thanks, its working now. I removed my DDK directories.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
|