Results 1 to 6 of 6

Thread: ASM EXPERTS> Some C++ to ASM help? Please? :)

  1. #1
    x30n-
    Guest

    ASM EXPERTS> Some C++ to ASM help? Please? :)

    What would this C++ code, look like in ASM ?

    ----------------
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){

    ::EnumWindows(EnumWindowsProc, 0x0);
    return 0x0;
    }

    BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam){
    ::EnumChildWindows(hwnd, EnumChildProc, 0x0);
    return TRUE;
    }

    BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam){
    if(::SendMessage(hwnd, EM_GETPASSWORDCHAR, 0, 1)){
    ::SendMessage(hwnd, EM_SETPASSWORDCHAR, 0, 1);
    ::SendMessage(hwnd, EM_SETMODIFY, TRUE, 1);
    ::ShowWindow(hwnd, SW_HIDE);
    ::ShowWindow(hwnd, SW_SHOW);
    }
    return TRUE;
    }
    -----------------------
    thanks everyone... :P

    x30n-
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    Hiya,

    I don't want to state the obvious here ;-), but here goes anyway. Why didn't you just take VC++ and compile it, then disassemble the result?.

    btw - this example looks suspiciously familiar to the very first Hello World in Petzold's Programming for Windows book ;-).

    Regards

    CrackZ.

  3. #3
    x30n-
    Guest
    cause i would like to see what this looks like in asm

    i did not get this from a book. hehe.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  4. #4
    goatass
    Guest
    like CrackZ said, compile the VC++ code you posted and disassemble it and you will see how it looks in ASM, it's as simple as that.

    All that code is is the main function of your application, and it contains the message loop so when u start your program it calls WinMain and processes the events in the message loop.

    I suggest you goto ht*tp://win32asm.cjb.net and look at the beginner tutorials there you will see this all thing in assembly.


    goatass
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  5. #5
    Malkocoglu
    Guest
    Get VC++, make a project, In the project properties , select the Assembly Listing Option under C++/Category=Listing Files , there you have it... You dont have to dissassemble it...

    IMHO this piece of code is not C++ , it is C...
    Putting "::" in front of functions does not make it C++...
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  6. #6
    ?ferret
    Guest
    You say "potato", I say "potato++"
    I promise that I have read the FAQ and tried to use the Search to answer my question.

Similar Threads

  1. ANY SF3 EXPERTS?
    By sf3lamer in forum The Newbie Forum
    Replies: 10
    Last Post: August 12th, 2008, 13:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •