Programming °æ (¾«»ªÇø)
·¢ÐÅÈË: Sun (´óµÆÅÝ), ÐÅÇø: Programming
±ê Ìâ: [תÔØ] [ÌÖÂÛ]ÓÃCreateFileÈ¡VXD¾ä±ú
·¢ÐÅÕ¾: ×Ï ¶¡ Ïã (Thu Sep 9 10:41:30 1999), תÐÅ
¡¾ ÒÔÏÂÎÄ×ÖתÔØ×Ô VisualProgram ÌÖÂÛÇø ¡¿
¡¾ ÔÎÄÓÉ xiaojun Ëù·¢±í ¡¿
Ö÷Ìâ: [ÌÖÂÛ]ÓÃCreateFileÈ¡VXD¾ä±ú kingchurch (ת¼Ä)
ÈÕÆÚ: 1998Äê9ÔÂ19ÈÕ 07:31:44
·¢¼þÈË: lyj.bbs@bbs.net.tsinghua.edu.cn
ÊÕ¼þÈË: lyj@hs1.hit.edu.cn
·¢ÐÅÈË: suxm (±¿±¿), ÐÅÇø: Programming
±ê Ìâ: Re: лл±¿±¿£¡ÇëÎÊÓÃCreateFileÈ¡vxd¾ä±úΪʲôÀÏ·µ»
·¢ÐÅÕ¾: BBS ˮľÇ廪վ (Thu Apr 23 12:01:55 1998)
ʹһ¸öVXD³ÉΪ¿É¶¯Ì¬¼ÓÔصģ¬±ØÐëÒªÏÂÃæµÄ¼¸²½£º
1.±ØÐë°ÑÕâ¸öVXD×ö³ÉWin95 only file£¬ÒòΪWIN31µÄVXD²»Äܶ¯Ì¬
¼ÓÔØ¡£ÄãÖ»Òª±ð¶¨ÒåWIN31COMPAT¾Í³ÉÀ²¡£
2.ÔÚÄãµÄdefÎļþÖмÓÈëVXD MYVXD DYNAMIC¡£¶ÔÓÚVTOOLSD£¬ºÃÏóÐèÒª
DYNAMIC=1¡£
3.ÔÚWIN32APPÖУº
HANDLE hDevice = CreateFile("\\\\.\\pathname",0,0,NULL,0,FILE_FLAG_
DELETE_ON_CLOSE,NULL);
4.Äã±ØÐëÔÚVXDÖд¦ÀíW32_DEVICEIOCONTROL¿ØÖÆÏûÏ¢¡£ÒòΪÄãµÄWIN32APPÔÚCreateFile
ʱµ÷ÓÃÁËËü£¬Õâ¸öÂ¾³£ÓÐÈ˺öÂÔ£¬ÒÔΪ°ÑÒ»¸öWIN31 VXDÖ»×öÇ°Á½²½¸Ä¶¯
¾Í¿ÉÒÔ¶¯Ì¬¼ÓÔØÁË¡£ÔÚVXDÖÐ×ö·¨ÈçÏ£º
#include <vwin32.h>
DWORD __stdcall ONW32DeviceIoControl(PDIOCRARAMETERS p)
{
switch(p->dwIoControlCode)
{
case DIOC_GETVERSION:
return 0;
}
}
Ï£ÍûÄã¸ã¶¨Ö®ºó£¬Ð´ÆªÎÄÕÂÉÏÀ´Ó´¡£ºÇºÇ¡£
BTW£ºWIN31APP¶¯Ì¬¼ÓÔØVXDÒ²ÊÇÓа취µÄ£¬ÒÔºóÔÙ˵°É¡£
¡¾ ÔÚ xiaoniu (none) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: Ê®·Ö¸ÐлÉÏÒ»¸öÎÊÌâµÄ»Ø´ð£¬ÏÖÇë½ÌÁíÒ»ÎÊÌâÓÃCreateFileÈ¡vxd¾ä±úΪʲôÀÏ·µ»Ø32£¿
:
: ÒÔÏÂÊÇÔÚ32λӦÓóÌÐòÖÐÈ¡vxd¾ä±úµÄÒ»¶ÎÓ¦ÓóÌÐò
:
: hDevice = CreateFile("\\\\.\\HARDINTC.VXD", 0,0,0,
: CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, 0);
:
: if (hDevice == INVALID_HANDLE_VALUE)
: {
: fprintf(stderr, "Cannot load VxD, error=%08lx\n",
: GetLastError());
: exit(1);
: }
:
: ÏëÈ¡µÃvtoolsd¸øµÄhardintcÀý×ӵľä±ú(ÎÒÔÚhardintc.makÖмÓÁË"DYNAMIC=1"ÓÃvc5.0±àÒëͨ¹ý)
: £¬µ±ÓÃÉÏÊö³ÌÐòµ÷ÓÃʱ£¬ÏÔʾ"Cannot load VxD, 00000032"¡£²éGetLastError()·¢ÏÖ´íÎóÂë32ÊÇ
: ÎļþÒÑ´ò¿ª¡£ÓÃVxD Viewer²é¿´£¬hardintc.vxdÔÚÔËÐд˳ÌÐòºóÒÑloadÉÏÁË£¬¶øÇÒÒ»µ©loadÉϾÍ
: Ö»ÄÜÓÃvxd loader½«Æäunload¡£Why? ÈçºÎ½â¾ö£¿
:
: ÁíÍ⣬ÎÒÔÚVireoÖ÷Ò³ÉÏÏÂÔصÄhwintcÀý×ÓÓÃÉÏÊö·½·¨Ò²³öͬÑùµÄÎÊÌ⣬µ«hwintc.makÖÐÒÑÓÐ
: "DYNAMIC=1"£¬ÎÒδ¶Ô´ËÀý×Ó×÷ÈκθĶ¯¡£
: m¡ù À´Ô´:¡¤BBS ˮľÇ廪վ bbs.net.tsinghua.edu.cn¡¤[FROM: 202.99.8.184] m
--
;33m___________________
;32m³Ô˯³Ô˯³Ô˯³Ô˯³Ô˯
;33m___________________
m4m¡ù À´Ô´:¡¤BBS ˮľÇ廪վ bbs.net.tsinghua.edu.cn¡¤[FROM: 166.111.10.154]m
--
¡ù À´Ô´:£®×Ï ¶¡ Ïã bbs.hit.edu.cn£®[FROM: hs5.hit.edu.cn]
--
¡ù תÔØ:£®×Ï ¶¡ Ïã bbs.hit.edu.cn£®[FROM: 202.118.239.237]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º3.510ºÁÃë