SKELETON.C
Upload User: lx1888888
Upload Date: 2007-01-04
Package Size: 136k
Code Size: 2k
Category:

Driver Develop

Development Platform:

Visual C++

  1. #include <windows.h>
  2. #include "skeleton.h"
  3. DEVICECONTEXT Device1 = { 0 };
  4. DRIVERPARAMS DefaultParams = { 1024 };
  5. BOOL FAR PASCAL __export SKELETON_ThunkConnect16(LPSTR pszDll16,  
  6.     LPSTR pszDll32, WORD hInst, DWORD dwReason); 
  7.  
  8. BOOL FAR PASCAL __export DllEntryPoint(DWORD dwReason, WORD hInst, 
  9.         WORD wDS, WORD wHeapSize, DWORD dwReserved1, 
  10.         WORD wReserved2) { 
  11.     if (!(SKELETON_ThunkConnect16("SKELETON.DLL", // name of 16-bit DLL 
  12.             "SKEL32.DLL",                   // name of 32-bit DLL 
  13.             hInst, dwReason))) { 
  14.         return FALSE; 
  15.     } 
  16.     return TRUE; 
  17. }
  18.  
  19. HDEVICE FAR PASCAL _export DeviceOpen( void )
  20. {
  21.   OutputDebugString( "DeviceOpenn");
  22. return &Device1;
  23. }
  24. int FAR PASCAL _export DeviceClose( HDEVICE hDevice )
  25. {
  26. OutputDebugString( "DeviceClosen");
  27. return 0;
  28. }
  29. int FAR PASCAL _export DeviceGetWriteStatus( HDEVICE hDevice, LPWORD pusStatus )
  30. {
  31. OutputDebugString( "DeviceGetWriteStatusn");
  32. return 0;
  33. }
  34. int FAR PASCAL _export DeviceGetReadStatus( HDEVICE hDevice, LPWORD pusStatus )
  35. {
  36. OutputDebugString( "DeviceGetReadStatusn");
  37. return 0;
  38. }
  39. int FAR PASCAL _export DeviceWrite( HDEVICE hDevice, LPBYTE lpData, LPWORD pcBytes )
  40. {
  41. OutputDebugString( "DeviceWriten");
  42. return 0;
  43. }
  44. int FAR PASCAL _export DeviceRead( HDEVICE hDevice, LPBYTE lpData, LPWORD pcBytes )
  45. {
  46. OutputDebugString( "DeviceReadn");
  47. return 0;
  48. }
  49. int FAR PASCAL _export DeviceSetDriverParams( HDEVICE hDevice, PDRIVERPARAMS pParms )
  50. {
  51. OutputDebugString( "DeviceSetDriverParamsn");
  52. return 0;
  53. }
  54. int FAR PASCAL _export DeviceGetDriverParams( HDEVICE hDevice, PDRIVERPARAMS pParms )
  55. {
  56. OutputDebugString( "DeviceGetDriverParamsn");
  57. return 0;
  58. }
  59. int FAR PASCAL _export DeviceGetDriverCapabilities( HDEVICE hDevice, PPDRIVERCAPS ppDriverCaps )
  60. {
  61. OutputDebugString( "DeviceGetDriverCapabilitiesn");
  62. return 0;
  63. }