ChrisL Posted May 9, 2007 Posted May 9, 2007 Where would you go to learn about using dlls. I have a header file for a dll but I don't really understand what I would do to use it. Here is a bit from the file does this actually mean anything to anybody? CODE /********************************************************************************/ /* FunctionName : MCP_Init */ /* FunctionType : DWORD MCP_Init(void); */ /* Arguments : */ /* ReturnValue : DWORD; */ /* MCP_OK : OK, Else : Error info. */ /* Description : Initialize SDK printer control. */ /* Notes : */ /* CREATE 2005/03/17 */ /********************************************************************************/ DWORD WINAPI MCP_Init(void); /********************************************************************************/ /* FunctionName : MCP_Finish */ /* FunctionType : DWORD MCP_Finish(void); */ /* Arguments : */ /* ReturnValue : DWORD; */ /* MCP_OK : OK, Else : Error info. */ /* Description : Finish SDK printer control. */ /* Notes : */ /* CREATE 2005/03/17 */ /********************************************************************************/ DWORD WINAPI MCP_Finish(void); /********************************************************************************/ /* FunctionName : MCP_EnumPrinter */ /* FunctionType : DWORD MCP_EnumPrinter(PUINT puiNumPrinter, PHANDLE phPrinter);*/ /* Arguments : puiNumPrinter [iN] Number of printer handles want to get. */ /* [OUT] Number of found printer handles. */ /* phPrinter [OUT] Printer handles array. */ /* ReturnValue : DWORD; */ /* MCP_OK : OK, Else : Error info. */ /* Description : Search target printers. */ /* Notes : */ /* CREATE 2005/03/17 */ /********************************************************************************/ DWORD WINAPI MCP_EnumPrinter(PUINT puiNumPrinter, PHANDLE phPrinter); /********************************************************************************/ /* FunctionName : MCP_OpenPrinter */ /* FunctionType : DWORD MCP_OpenPrinter(HANDLE hPrinter, DWORD dwIdleTimeout); */ /* Arguments : hPrinter [iN] Handle of printer. */ /* dwIdleTimeout [iN] Idle timeout setting. (Second) */ /* (Set MCP_TIMEOUT_INFINITE.) */ /* ReturnValue : DWORD; */ /* MCP_OK : OK, Else : Error info. */ /* Description : Start control specified printer. (Connect printer) */ /* Notes : */ /* CREATE 2005/03/17 */ /********************************************************************************/ DWORD WINAPI MCP_OpenPrinter(HANDLE hPrinter, DWORD dwIdleTimeout); [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
evilertoaster Posted May 9, 2007 Posted May 9, 2007 Dllcall has documentation for what to do. I'm no expert but i guess for this function somthing like this should work... DllCall ( "dllname", "DWORD", "MCP_Init")
ChrisL Posted May 9, 2007 Author Posted May 9, 2007 Dllcall has documentation for what to do. I'm no expert but i guess for this function somthing like this should work...DllCall ( "dllname", "DWORD", "MCP_Init")thanks thats what I thought for that one, I dont get this though DWORD WINAPI MCP_EnumPrinter [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
PaulIA Posted May 9, 2007 Posted May 9, 2007 thanks thats what I thought for that one, I dont get this though DWORD WINAPI MCP_EnumPrinter/********************************************************************************/ /* FunctionName : MCP_EnumPrinter */ /* FunctionType : DWORD MCP_EnumPrinter(PUINT puiNumPrinter, PHANDLE phPrinter);*/ /* Arguments : puiNumPrinter [IN] Number of printer handles want to get. */ /* [OUT] Number of found printer handles. */ /* phPrinter [OUT] Printer handles array. */ /* ReturnValue : DWORD; */ /* MCP_OK : OK, Else : Error info. */ /* Description : Search target printers. */ /* Notes : */ /* CREATE 2005/03/17 */ /********************************************************************************/ DWORD WINAPI MCP_EnumPrinter(PUINT puiNumPrinter, PHANDLE phPrinter); Hmm... Maybe something like: $aResult = DllCall("DllName", DWORD, "MCP_EnumPrinter", "int_ptr", 9999, "ptr", 0) ConsoleWrite("Return result .......: " & $aResult[0]) ConsoleWrite("Handles found .......: " & $aResult[1]) ConsoleWrite("Printer array pointer: " & $aResult[2]) Auto3Lib: A library of over 1200 functions for AutoIt
ChrisL Posted May 10, 2007 Author Posted May 10, 2007 thanks I'll give it a go [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now