Click here to Skip to main content
15,886,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can we make a win32 application as a service Pin
Zdeslav Vojkovic3-Jan-06 0:12
Zdeslav Vojkovic3-Jan-06 0:12 
AnswerRe: Can we make a win32 application as a service Pin
kakan3-Jan-06 0:14
professionalkakan3-Jan-06 0:14 
QuestionSend FAX Pin
aasstt2-Jan-06 22:07
aasstt2-Jan-06 22:07 
AnswerRe: Send FAX Pin
kakan2-Jan-06 22:37
professionalkakan2-Jan-06 22:37 
QuestionHow to use C++ modules in .Net. Pin
Sumit Kumar Khatri2-Jan-06 21:55
Sumit Kumar Khatri2-Jan-06 21:55 
AnswerRe: How to use C++ modules in .Net. Pin
Zdeslav Vojkovic2-Jan-06 23:07
Zdeslav Vojkovic2-Jan-06 23:07 
AnswerRe: How to use C++ modules in .Net. Pin
ThatsAlok2-Jan-06 23:42
ThatsAlok2-Jan-06 23:42 
Questionuserland hooks, some questions about this article Pin
devvvy2-Jan-06 21:28
devvvy2-Jan-06 21:28 
I have some questions about userland hooks and this article Process-wide API spying - an ultimate hack by Anton Bassov.

QUESTION 1:
why "ProxyProlog" + "Prolog"? Why not just "Prolog" - ie. eliminate "ProxyProlog" and jump directly to "Prolog" intead?

QUESTION 2: The following code in DllMain of the injected Dll? Is there any place where we can download the source?

<br />
IMAGE_DOS_HEADER * <br />
dosheader=(IMAGE_DOS_HEADER *)hMod;<br />
<br />
IMAGE_OPTIONAL_HEADER * opthdr =<br />
  (IMAGE_OPTIONAL_HEADER *) ((BYTE*)hMod+dosheader->e_lfanew+24);<br />
<br />
IMAGE_IMPORT_DESCRIPTOR <br />
*descriptor=<br />
      (IMAGE_IMPORT_DESCRIPTOR *)(BYTE*) hMod +<br />
      opthdr->DataDirectory[ IMAGE_DIRECTORY_ENTRY_IMPORT]. <br />
VirtualAddress;<br />
<br />
while(descriptor ->FirstThunk)<br />
{<br />
    char*dllname=(char*)((BYTE*)hMod+ descriptor ->Name);<br />
<br />
    IMAGE_THUNK_DATA* thunk=( IMAGE_THUNK_DATA*)((BYTE*) hMod +<br />
                                 descriptor ->OriginalFirstThunk);<br />
<br />
    int x=0;<br />
    while(thunk->u1.Function)<br />
    {<br />
        char*functionname=(char*)((BYTE*) hMod +<br />
                ( DWORD)thunk->u1.AddressOfData+2);<br />
<br />
        DWORD *IATentryaddress=( DWORD *)((BYTE*) hMod +<br />
                descriptor->FirstThunk)+x;<br />
        x++; thunk++;<br />
    }<br />
<br />
    descriptor++;<br />
}<br />
<br />
struct RelocatedFunction{DWORD proxyptr;<br />
DWORD funtioncptr;char *dllname;char *functionname;};<br />
<br />
BYTE* ptr=(BYTE*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,32);<br />
RelocatedFunction * reloc=(RelocatedFunction*)&ptr[6];<br />
DWORD addr=(DWORD)&ProxyProlog;<br />
reloc->proxyptr=addr;<br />
reloc->funcname= functionname;<br />
reloc->dllname=dllname;<br />
memmove (&reloc->functionptr, IATentryaddress,4);<br />
ptr[0]= 0xFF; ptr[1]= 0x15; memmove(&ptr[2],&reloc,4);<br />
DWORD byteswritten;<br />
WriteProcessMemory(GetCurrentProcess(),IATentryaddress,&ptr,4,&byteswritten);<br />


QUESTION 3:
What header do we need to include?

Thanks in advance. Thanks!

-- modified at 3:35 Tuesday 3rd January, 2006
AnswerRe: userland hooks, some questions about this article Pin
Owner drawn2-Jan-06 21:41
Owner drawn2-Jan-06 21:41 
General yeah well. I did. No one is answering. Pin
devvvy2-Jan-06 21:42
devvvy2-Jan-06 21:42 
QuestionWhat happens in my VC++ application Pin
SeanQA2-Jan-06 20:54
SeanQA2-Jan-06 20:54 
AnswerRe: What happens in my VC++ application Pin
Owner drawn2-Jan-06 21:01
Owner drawn2-Jan-06 21:01 
AnswerRe: What happens in my VC++ application Pin
Zdeslav Vojkovic2-Jan-06 23:11
Zdeslav Vojkovic2-Jan-06 23:11 
AnswerRe: What happens in my VC++ application Pin
Michael Dunn3-Jan-06 8:01
sitebuilderMichael Dunn3-Jan-06 8:01 
QuestionImplementation of Multipage PDF Pin
Ramnath Panda2-Jan-06 20:31
Ramnath Panda2-Jan-06 20:31 
AnswerRe: Implementation of Multipage PDF Pin
khan++3-Jan-06 3:12
khan++3-Jan-06 3:12 
Questionfacing prob with splitterwnd in CMainFrame of MDI app. Pin
geeta_patil2-Jan-06 20:11
geeta_patil2-Jan-06 20:11 
AnswerRe: facing prob with splitterwnd in CMainFrame of MDI app. Pin
Owner drawn2-Jan-06 20:18
Owner drawn2-Jan-06 20:18 
GeneralRe: facing prob with splitterwnd in CMainFrame of MDI app. Pin
geeta_patil2-Jan-06 21:20
geeta_patil2-Jan-06 21:20 
GeneralRe: facing prob with splitterwnd in CMainFrame of MDI app. Pin
Owner drawn2-Jan-06 21:22
Owner drawn2-Jan-06 21:22 
GeneralRe: facing prob with splitterwnd in CMainFrame of MDI app. Pin
geeta_patil2-Jan-06 21:51
geeta_patil2-Jan-06 21:51 
GeneralRe: facing prob with splitterwnd in CMainFrame of MDI app. Pin
Owner drawn2-Jan-06 22:15
Owner drawn2-Jan-06 22:15 
JokeOT Pin
Eytukan3-Jan-06 5:28
Eytukan3-Jan-06 5:28 
GeneralRe: OT Pin
Owner drawn3-Jan-06 16:52
Owner drawn3-Jan-06 16:52 
QuestionCustom drawn Tab controls Pin
MrNed2-Jan-06 20:00
MrNed2-Jan-06 20:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.