Red de conocimiento informático - Material del sitio web - Cómo usar VC Cómo crear tipos de datos después de usar el complemento Desert

Cómo usar VC Cómo crear tipos de datos después de usar el complemento Desert

#include "afxdialogex.h"

#include lt;windows.hgt;

#include lt;iostreamgt;

#include lt;stringgt;

p>

#include lt;stringgt;

#include lt;tchar.hgt;

#include lt;comutil.hgt;

#include lt;atlconv.hgt;

#import "C:\test_game\dm.dll" rename("SetWindowText", "DmSetWindowText") rename("FindWindow", "DmFindWindow") rename("FindWindowEx" , "DmFindWindowEx") rename("StrStr", "DmStrStr")

#import "C:\test_game\WebOperation.dll"

Usar espacio de nombres std;

Usar espacio de nombres Dm;

int h=500, h1=1000, h2 =2000;

Idmsoft* dme;

HINSTANCE hDll;

typedef int(*lpScrollTo)(int, int);

typedef int(*lpGethWnd)(_bstr_t, int);

long hwnd1 , hwnd2;

HWND hwnd3;

void Scroll(int argc, int arg)

{

HINSTANCE hDll;

lpScrollTo ScrollTo;

//LPCSTR lpStr = (LPCSTR)("C. /test_game /test_game /test_game /test_game /test_game /test_game /test_game /test_game /test_game /test_game\ test_game\WebOperation .dll");

//char* pszGbt=new char[70];

//(LPWCSTR)("C:\test_game\WebOperation.dll" )

hDll = LoadLibrary(LPCWSTR("C:\test_game\WebOperation.dll"));

if (hDll ! = NULL)

{

ScrollTo = (lpScrollTo)GetProcAddress(hDll, "ScrollTo");

if (ScrollTo != NULL)

{

ScrollTo(argc, arg);

}

FreeLibrary(hDll);

}

obtención larga

hWnd1(_bstr_t ar, int arg)

{

HINSTANCE hDll

lpGethWnd GethWnd

//LPCSTR lpStr = (LPCSTR; )("C. /test_game /test_game /test_game /test_game /test_game /test_game /test_game /test_game /test_game\test_game\WebOperation.dll");

//char* pszGbt=new char[70]

//(LPWCSTR)("C:\test_game\WebOperation.dll")

hDll = LoadLibrary(LPCWSTR("C:\test_game\WebOperation.dll")) ;

if (hDll != NULL)

{

GethWnd = (lpGethWnd)GetProcAddress(hDll, "GethWnd");

if (GethWnd != NULL)

{

return GethWnd(ar, arg

}

FreeLibrary(hDll); ;

}

}

void chushihua1()

{

CoInitialize(NULL);

p>

CLSID clsid;

HRESULT hr=CLSIDFromProgID(OLESTR("dm.dmsoft"),& clsid);

hr=CoCreateInstance( clsid , NULL, CLSCTX_INPROC_SERVER ,__uuidof(Idmsoft),(LPVOID*)&dme);

_bstr_t dvr=dme-gt;Ver();

//CString cstr((char * ) dvr );

//AfxMessageBox(dvr);

}

void jubing()

{

hwnd1=dme-gt;DmFindWindow((_bstr_t)", (_bstr_t)")", (_bstr_t) "Q Will Three Kingdoms_Personal Center_Start Chinese - Microsoft Internet Explorer");

hwnd3=: : FindWindow((LPCWSTR)NULL, (LPCWSTR) "Q será Three Kingdoms_Personal Center_Start Chinese - Microsoft Internet Explorer

if (hwnd1! = 0)

{

dme-gt;SetWindowState(hwnd1, 4);

}

//hwnd2=HWND( dme-gt;DmFindWindowEx(1, "Internet Explorer_Server", "Q será Three Kingdoms_Personal Center_Qidian Chinese Network-Microsoft Int

ernet Explorer"));

hwnd2=GethWnd1((_bstr_t)"/game/game.aspx?appid=510",1);

}