- 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源码
rundllvb.cpp
资源名称:IE_VB.rar [点击查看]
上传用户:davilee3
上传日期:2015-04-22
资源大小:986k
文件大小:2k
源码类别:
浏览器
开发平台:
Visual Basic
- // rundllvb.cpp : Defines the entry point for the DLL application.
- //
- #include "stdafx.h"
- #include <windows.h>
- typedef int (CALLBACK *MYPROC)(int,int,int,int);
- typedef int (CALLBACK *dllreg)();
- BOOL APIENTRY DllMain( HANDLE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
- {
- return TRUE;
- }
- int FAR PASCAL RegCom(LPCSTR lpDll,int isReg)
- {
- HINSTANCE hinstLib;
- dllreg ProcAdd;
- int rtn=-1;
- BOOL fFreeResult, fRunTimeLinkSuccess = FALSE;
- // Get a handle to the DLL module.
- hinstLib = LoadLibrary(lpDll);
- // If the handle is valid, try to get the function address.
- if (hinstLib != NULL)
- {
- if (isReg==1)
- ProcAdd =(dllreg)GetProcAddress(hinstLib, "DllRegisterServer");
- else
- ProcAdd =(dllreg)GetProcAddress(hinstLib, "DllUnregisterServer");
- // If the function address is valid, call the function.
- if (fRunTimeLinkSuccess = (ProcAdd != NULL))
- {
- rtn=ProcAdd();
- }
- // Free the DLL module.
- fFreeResult = FreeLibrary(hinstLib);
- }
- return rtn;
- }
- int FAR PASCAL RunDll(LPCSTR lpDll,int lpWeb,int msg,int wparam,int lparam)
- {
- HINSTANCE hinstLib;
- MYPROC ProcAdd;
- BOOL fFreeResult, fRunTimeLinkSuccess = FALSE;
- int rtn=-1;
- // Get a handle to the DLL module.
- hinstLib = LoadLibrary(lpDll);
- // If the handle is valid, try to get the function address.
- if (hinstLib != NULL)
- {
- ProcAdd =(MYPROC)GetProcAddress(hinstLib, "ShellWeb");
- // If the function address is valid, call the function.
- if (fRunTimeLinkSuccess = (ProcAdd != NULL))
- {
- rtn=ProcAdd(lpWeb,msg,wparam,lparam);
- }
- // Free the DLL module.
- fFreeResult = FreeLibrary(hinstLib);
- }
- return rtn;
- }