- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
SKEL32.C
资源名称:vxdsrc.zip [点击查看]
上传用户:lx1888888
上传日期:2007-01-04
资源大小:136k
文件大小:2k
源码类别:
驱动编程
开发平台:
Visual C++
- #include <windows.h>
- #include "..16skeleton.h"
- DEVICECONTEXT Device1 = { 0 };
- DRIVERPARAMS DefaultParams = { 1024 };
- BOOL WINAPI SKELETON_ThunkConnect32(LPSTR pszDll16,
- LPSTR pszDll32, HINSTANCE hInst, DWORD dwReason);
- BOOL WINAPI DllMain(HINSTANCE hDllInst, DWORD dwReason, LPVOID lpvReserved)
- {
- if (!(SKELETON_ThunkConnect32("SKELETON.DLL", // name of 16-bit DLL
- "SKEL32.DLL", // name of 32-bit DLL
- hDllInst, dwReason))) {
- return FALSE;
- }
- return TRUE;
- }
- #define DLLEXPORT __declspec( dllexport )
- DLLEXPORT HDEVICE APIENTRY DeviceOpen32( void )
- {
- return DeviceOpen();
- }
- DLLEXPORT int APIENTRY DeviceClose32( HDEVICE hDevice )
- {
- return DeviceClose( hDevice );
- }
- DLLEXPORT int APIENTRY DeviceGetWriteStatus32( HDEVICE hDevice, LPWORD pusStatus )
- {
- return DeviceGetWriteStatus( hDevice, pusStatus );
- }
- DLLEXPORT int APIENTRY DeviceGetReadStatus32( HDEVICE hDevice, LPWORD pusStatus )
- {
- return DeviceGetReadStatus( hDevice, pusStatus );
- }
- DLLEXPORT int APIENTRY DeviceWrite32( HDEVICE hDevice, LPBYTE lpData, LPWORD pcBytes )
- {
- return DeviceWrite( hDevice, lpData, pcBytes );
- }
- DLLEXPORT int APIENTRY DeviceRead32( HDEVICE hDevice, LPBYTE lpData, LPWORD pcBytes )
- {
- return DeviceRead( hDevice, lpData, pcBytes );
- }
- DLLEXPORT int APIENTRY DeviceSetDriverParams32( HDEVICE hDevice, PDRIVERPARAMS pParms )
- {
- return DeviceSetDriverParams( hDevice, pParms );
- }
- DLLEXPORT int APIENTRY DeviceGetDriverParams32( HDEVICE hDevice, PDRIVERPARAMS pParms )
- {
- return DeviceGetDriverParams( hDevice, pParms );
- }
- DLLEXPORT int APIENTRY DeviceGetDriverCapabilities32( HDEVICE hDevice, PPDRIVERCAPS ppDriverCaps )
- {
- return DeviceGetDriverCapabilities( hDevice, ppDriverCaps );
- }