Build error on C++Builder 10.1 Berlin

c++ / delphi package - dll injection and api hooking
Post Reply
NobMiwa
Posts: 7
Joined: Tue Mar 28, 2017 10:00 am

Build error on C++Builder 10.1 Berlin

Post by NobMiwa »

Hello,

I'm new in madCodeHook. I tried to build simple InjectLibrary/UninjectLibrary console application with C++Builder.

C++Builder 10.1 Berlin
madCodeHook 3.1.14

I add include file
"C:\Program Files (x86)\madCollection\madCodeHook\BDS18\win32\madCodeHook.h"
and link with
"C:\Program Files (x86)\madCollection\madCodeHook\BDS18\win32\madCodeHook_.lib"

And I got link error of "cannot open 'WINAPI.WINDOWS.OBJ' ".

Do I include and link correctly ?

Regards,
Nobuo Miwa
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Re: Build error on C++Builder 10.1 Berlin

Post by madshi »

I've just tried the following:

1) Started BCB 10.1 Berlin.
2) Created a new project.
3) In a button click event I added a call to "GetCallingModule()" (which is a function exported by madCodeHook).
4) I added "#include "madCodeHook.h"" directly under the "#include "Unit1.h"" line.
5) I saved and compiled the project.

Worked fine for me.

No need to manually add any lib files. Probably the problem you've seen came from trying to add that lib file.
NobMiwa
Posts: 7
Joined: Tue Mar 28, 2017 10:00 am

Re: Build error on C++Builder 10.1 Berlin

Post by NobMiwa »

Hello madshi,

Thank you for the information.
It worked.

Thanks
NobMiwa
Posts: 7
Joined: Tue Mar 28, 2017 10:00 am

Re: Build error on C++Builder 10.1 Berlin

Post by NobMiwa »

When I tried to add new project of Form, it worked.
But when I tried to add new project of DLL, it didn't work.

1. I added new project of "Dynamic Link Library"
2. I added a line "#include "MadCodeHook.h"" above _libmain
3. I got "WINAPI.WINDOWS.OBJ" not found with ilink32 ERROR

Any suggestion ?
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Re: Build error on C++Builder 10.1 Berlin

Post by madshi »

I'm not sure, I'm not that big of an BCB expert. I suppose you may want to double check the library paths?
Post Reply