RegOpt.cpp
资源名称:IceSword.rar [点击查看]
上传用户:fjdqny
上传日期:2008-02-11
资源大小:921k
文件大小:1k
源码类别:
其他
开发平台:
Visual C++
- #include <windows.h>
- #include <stdio.h>
- #include "Cooperator.h"
- int main(int argc, char *argv[])
- {
- printf("IsConnectServern");
- if (!IsConnectServer())
- {
- printf("ConnectAndCalln");
- ConnectAndCall();
- }
- if (!IsConnectServer())
- {
- printf("Error to connect servern");
- return -1;
- }
- DWORD ret;
- IsdGetVersion(&ret);
- printf("Icesword version : %xn", ret);
- HANDLE hKey;
- if (IsdOpenKey(&hKey, KEY_ENUMERATE_SUB_KEYS, NULL_ROOT_DIR_HANDLE, L"\Registry\Machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"))
- {
- ULONG i = 0;
- char buf[2000];
- PKEY_VALUE_BASIC_INFORMATION basic = (PKEY_VALUE_BASIC_INFORMATION)buf;
- while (IsdEnumerateValueKey(hKey, i, KeyValueBasicInformation, basic, 2000, &ret) >= 0)
- {
- basic->Name[basic->NameLength/2] = 0;
- printf("%wsn", basic->Name);
- i++;
- }
- IsdCloseHandle(hKey);
- }
- return 0;
- }