Professional Documents
Culture Documents
ReadMe (En)
ReadMe (En)
## Copyright (C) Huawei Technologies Co., Ltd. 2004-2005. All rights reserved.
##
How to use: DevSetup.dll
1, DWORD DevSetup(BYTE byType, bool bDebug);
Descprition:
Install function, Uninstall funtion, Query funciton, Help funciton
Open/Colse debug informaiton
patameter:
byType:
0:
1:
2:
em;
3:
function type
Install the driver;
Uninstall the driver;
Duery whether we have installed driver in the Windows operating syst
Help information;
Failure code
// have already had a Process in the operating system which handle the driver;
#define DEV_SETUP_ERROR_ALREADY_EXISTS
DWORD(20001)
// Command parameter error
#define DEV_SETUP_ERROR_INVALID_CMD
// Do not support this Windows version
#define DEV_SETUP_ERROR_INVALID_SYS_VER
// Can not find driver install file
#define DEV_SETUP_ERROR_EMPTY_DIR
// Install failure
#define DEV_SETUP_ERROR_INSTALL_FAIL
// Delete the driver failure;
#define DEV_SETUP_ERROR_REMOVE_FAIL
DWORD(20002)
DWORD(20003)
DWORD(20004)
DWORD(20005)
DWORD(20006)
DWORD(10000)
DWORD(10001)
Sample Code(DevSetup.exe):
#include <Windows.h>
#include <Winbase.h>
#include <stdio.h>
void main(void)
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
if( !CreateProcess( NULL,
"DevSetup /install",
/help]
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&si,
&pi )
ure.
)
{
return;
}
dwReturn;
GetExitCodeProcess(pi.hProcess, &dwReturn);
printf("%d", dwReturn);
// Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
return;
}