📄 subject_66770.htm
字号:
<p>
序号:66770 发表者:friends 发表日期:2003-12-26 13:27:39
<br>主题:请教,dll的问题?
<br>内容:老板让写个dll要求:<BR> 在系统启动时就运行dll文件。<BR>我是一点办法也没有,该怎样做?请大侠指点一下!我感激不尽!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:徐相华 回复日期:2003-12-26 13:32:41
<br>内容:让系统启动时运行exe文件,exe加载dll,<BR>不确定
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:friends 回复日期:2003-12-26 13:37:25
<br>内容:我想是可以的,让我试试吧。不知道在有没有别的方法?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:林建华 回复日期:2003-12-26 13:37:50
<br>内容:rundll32
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:林建华 回复日期:2003-12-26 13:38:45
<br>内容:Platform SDK: Tools <BR>Rundll32<BR>The Run DLL utility (Rundll32.exe) included in Windows enables you to call functions exported from a 32-bit DLL. These functions must have the following syntax:<BR><BR>void CALLBACK EntryPoint(<BR> HWND hwnd, // handle to owner window<BR> HINSTANCE hinst, // instance handle for the DLL<BR> LPTSTR lpCmdLine, // string the DLL will parse<BR> int nCmdShow // show state<BR>);<BR>Note that EntryPoint is a placeholder for the actual function name. For a list of possible show states, see WinMain. <BR><BR>The following is the command-line syntax for Rundll32:<BR><BR>rundll32 DllName,FunctionName [Arguments]<BR>DllName <BR>Specifies the name of the DLL. The name cannot contain spaces, commas, or quotation marks. The utility searches for the DLL using the search criteria documented for the LoadLibrary function. Therefore, it is best to use the short name and provide a full path for the DLL. <BR>FunctionName <BR>Specifies the name of the function to call in DllName. Requires a comma (without no spaces) between DllName and FunctionName. <BR>Arguments <BR>Optional arguments for FunctionName. <BR>Rundll32 loads the specified DLL using LoadLibrary, obtains the address of the function using the GetProcAddress function, and calls the function with the specified arguments, if any. When the function returns, Rundll32 unloads the DLL and exits.<BR><BR>Windows NT/2000: It is possible to create a Unicode version of the function. Rundll32 first tries to find a function named EntryPointW. If it cannot find this function, it tries EntryPointA, then EntryPoint. To create a DLL that supports ANSI on Windows 95/98/Me and Unicode otherwise, export two functions: EntryPointW and EntryPoint. <BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:friends 回复日期:2003-12-26 13:40:20
<br>内容:“rundll32”这个我没用过,林兄讲讲,谢谢了!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:林建华 回复日期:2003-12-26 13:52:56
<br>内容:rundll32是运行dll提供的接口的程序
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:friends 回复日期:2003-12-26 14:06:59
<br>内容:能不能提供一小段代码?让我感受一下!是像这个样子的吗?<BR>::ShellExecute(NULL, "open", "C:\\WINDOWS\\rundll32.exe", "Rundll32.exe MyDll.dll MyFunc",NULL,SW_SHOW);<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:林建华 回复日期:2003-12-26 14:21:22
<br>内容:在注册表的运行里面添加就可以在系统重启的时候直接运行你的dll了:)<BR>Rundll32 目录\mudll.dll,函数名称 参数
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -