??Windows????????小??????????????
???????????? ???????[ 2012/10/9 10:52:17 ] ????????
?????????????????????????????????????????????????????????????位???????????????????????????????????????????????????????????????????????????????????楗桺CB???????????????????????????械???????校??????????????????????????????????????????????????????????????
??????????????????????????械???????????????????????????
????1??????????????????????????????????????????????????????????
????2??????????????邪??????锌?????????DLL?????????????
????Windows??????????????贸???GUI?????CUI?????????????????????????写????????????贸???????????????贸????????vc????????贸??????????????????????????????????????些?????????????????????????????????????????CUI?????????????/SUBSYSTEM??CONSOLE??????GUI????????/SUBSYSTEM??WINDOWS??
??????些???????????????????????????????????????GUI???????????????WinMain??CUI??????main??
????????????????????????械????????????????????????????????????????????????????????煤????????????C/C++???锌?????????????C++??????
??????????贸???????????????????????????ANSI??????锟�?GUI??????????????WinMainCRTStartup??????????WinMain??CUI???????????mainCRTStartup??????????main??Unicode??????锟�?GUI??????????????wWinMainCRTStartup??????????wWinMain??CUI???????????wmainCRTStartup?????????wmain??
??????????写??????渭???贸?????????????argv???????????胁????????????????????????????????????????????????????????????????????????????????????
????1??????????????
????2???????????????????
????3???????C/C++???锌??????????
????4???????C???锌??????浜�????
????5????????????????C++?????????????
?????????????些????????????????????贸???????????????????????????????????????????????????????C???锌???exit??Exit????????????????????C++?????????????????????????????????????????????????ExitProcess??????????????????梅????????????
??????????????????????????????DLL??????????????????????????????????位?谩???????????????????????WinMain??????????????????????????????????????????????????????????????????????械????位?谩????????????????????????????????????????????貌??????????????exe?????dll???????????????????exe?????400000??dll??10000000??
??????????????????????dll????????????????????位??????????GetModuleHandle????????????????/0??尾?????????????dll????????????????????????NULL??????????????????????????????????????????????????dll????????????????????????????dll????校????????????????????????????????校?????????GetModuleHandleEx???????GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS?????????????????????????????????????????????????????????????????????????????????????dll????????
??????????????????????????????校??????????????????????????娲�?锌??????????????C???锌?????????????????GUI??贸???????????windows????GetCommandLine????y?????????????校??????????????????????????????WinMain??pszCmdLine??????
????????????????????????????????椤�??????骞�?????????????????????????????????谩???贸??????????????????????????????????????????????????????谐???????????贸????????????????????胁?????????????????????????????????????????????????????????????????????????????????????GetEnvironmentStrings????????????????????椤�?????????????榛�??????????些??????????????????????????????????????????些??????????????????小??????????械???????????????????????????????????????????椤etEnvironmentVariable?????????????卸???????????????????
?????????????????????????%USERPROFILE%??????????????????%????????????????????婊�???????????????????????????????濉�
???????????SetEnvironmentVariable???????????????????????
????Windows???????????????????????????????谢??????????????????????????????????????y?????????????????????????????????
????????????????校????????????????cpu?????校????????????????????????????涓�???????????
?????????????????路??????windows????????????????????????????????????纾�????CreateFile??????????????????????????????????????????????????????
??????????????????????????????????????????些?????????????位????????????y????????????????????????????????????????????????
????????????????GetCurrentDirectory??SetCurrentDirectory????煤?????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????GetVersionEx??????window????姹�???
??????

???路???
??????????????????
2023/3/23 14:23:39???写?貌??????????
2023/3/22 16:17:39????????????????????些??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???路???????路
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11