发布于 2005-12-21 18:41:02
0楼
用ODK获取DSN名,然后生成网址字符串,再用shellExecuteA函数打开网页
#pragma code("shell32.dll")
long ShellExecuteA(HWND,LPCTSTR,LPCTSTR,LPCTSTR,LPCTSTR,int);
#pragma code()
char dsnStr[100];
HWND hwnd;
sprintf(dsnStr,"http://LocalHost/test.asp?dsnStr=%s",GetDSN(1)); //Return-Type: LPCTSTR
printf("\r\n%s",dsnStr);
hwnd=FindWindow(NULL,"WinCC-Runtime - ");
ShellExecuteA(hwnd,"open",dsnStr,NULL,"C:\\",SW_SHOWNORMAL);
非淡泊无以明志,非宁静无以致远