开发者

External class-calling

Hi guys i have a bit of a problem with a few classes, and i would be very grateful if someone can help me out. So i 开发者_开发技巧have:

  1. Already compiled executable (for whom i don't have the source)
  2. A class in that program that i want to call

The program doesn't have export for the class, and that's my problem i don't have definition for this class, so is there a way to get a callback to this class?

Example: In the compiled executable:

foo::bar (example) { printf(example); }

My app:

CALLBACK(foo::bar, "this text must be passed as argument")

Or in other words i want to call a class in other executable (without having its source) and pass arguments to its function.


if your executable(application ) can take that argument as command line argument you can call that application with command line argument as that parameter

for example in win32 API

LPTSTR szCmdline = _tcsdup(TEXT("C:\\Program Files\\MyApp -L -S"));
    CreateProcess(NULL, szCmdline, /* ... */);

That is at max you can do with any application... -L and -S will pass as argument to MyApp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜