有个使用 winmain 函数写的窗口程序
我想把这个窗口封装进DLL里面,请问该怎么做?我不明白的地方:因为 winmain 是由 OS 调用,那我的DLL里面的导出函数,不可能就写 winmain 吧?
谢谢,祝大家身体健康

解决方案 »

  1.   

    winmain 是由 OS 调用
    ====================
    Actually, you still can modify the entry function using a new name(e.g, MyWinMain) instead of WinMain.
    How to set a new name? In VC IDE, Please go to Project > settings > link,
    then choice 'output' in 'category:' list
    In 'Entry-point-symbol' edit-box, input a new name.那我的DLL里面的导出函数,不可能就写 winmain 吧?
    ===============================================
    If you won't intend to make win32 dll(i.e, exclude <windows.h>), you still can write and export a function called WinMain, but there will be a warning - C4007.