Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Using C and C++ at the same time [VS2010]

Name: Anonymous 2011-10-01 19:06

Terrible!!, I know, but I'm trying to inject a function (written in C) into a process and I need to get the address of the function, but the injecting function is written in C++. &function doesn't point to the actual function but to a jump instruction (which I assume jumps to the function) both when I do it in C++ code and when I make a simple C function to return the address. How do I bypass this thunk?

Name: Anonymous 2011-10-01 19:58

who said black hats need to know shit

Name: sage 2011-10-01 20:24

hu sed plek hds nìt2no ŝit

Name: Anonymous 2011-10-01 20:59

>>1
I've seen this convention appear in Borland and Microsoft compilers. Have you tried some inline assembly?

Name: John Carmack 2011-10-01 21:06

>>4
Hey. Do you like little boys as much as I do? Just curious, because I'm the president of Michigan NAMBLA chapter for nambla.org. I came on this board to find other men who also like little boys.

Name: Anonymous 2011-10-01 21:07

ignorant fake programmer blames his failings on unhip language.  /prog/ thread at 11.

Name: Anonymous 2011-10-01 22:03

>>4
The VS disassembly shows that return &function; assembles to mov eax,offset @ILT+410(_function@4), but dumpbin just gives mov eax,offset _inj_FindFunction@4. And if I substitute the return statement with __asm mov eax,offset function; it changes to the above snippet anyway.
This seems to be some kind of debug thing; it doesn't happen when I switch the project to Release mode, but I still wish I knew how to turn that off.

Name: Anonymous 2011-10-01 23:02

>>7
This seems to be some kind of debug thing; it doesn't happen when I switch the project to Release mode, but I still wish I knew how to turn that off.
Then switch it to Release mode, idiot.

Name: Anonymous 2011-10-02 5:35

>>7
Never used VS, but have you tried disabling incremental compilation?

Name: Anonymous 2011-10-02 7:55

>>1
Just write a wrapper for it an extern "C" it.

Name: Anonymous 2011-10-02 8:05

hax &my_anus

Name: Anonymous 2011-10-02 8:47

>but the injecting function is written in C++
And it is above your paygrade to rewrite it in plain C.
Also:
http://www.codeproject.com/KB/winsdk/CodeInject.aspx

Name: Anonymous 2011-10-02 8:48

>>7
LoseThos is for recreational programming.  I decided the user always wanted full symbolic debugging for all symbols.

I made the compiler/assembler.  It follows no standards, has no object files and, if used right, has no binery/executable files except the kernel and compiler.  No linker, but loader kind-of links.

Forget your preconceived notions.

God says...
C:\TEXT\WORD2.TXT

nd dance,
  Without a shadow of mischance,
        Till he was ten years old.

  When one day (and now mark me well,
  You soon shall know how this befel)
  He's in a vessel of his own,
  On the swift water hurrying down
        Towards the mighty Sea.                           100

  In such a vessel ne'er before
  Did human Creature leave the shore:
  If this or that way he should stir,
  Woe to the poor blind Mariner!
      For death will be his doom.

  Strong is the current; but be mil

Name: Anonymous 2011-10-02 8:55

NAZI's said Jews were subhuman.

Is that your point?

God says...
C:\TEXT\BIBLE.TXT

e by
any man, or by all thy people Israel, which shall know every man the
plague of his own heart, and spread forth his hands toward this house:
8:39 Then hear thou in heaven thy dwelling place, and forgive, and do,
and give to every man according to his ways, whose heart thou knowest;
(for thou, even thou only, knowest the hearts of all the children of
men;) 8:40 That they may fear thee all the days that they live in the
land which thou gavest unto our fathers.

8:41 Moreover concerning a strange

Don't change these.
Name: Email:
Entire Thread Thread List