日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

c语言error c4430,error C4430: 缺少类型说明符 - 假定为 int。 异常怎么解决

發(fā)布時(shí)間:2025/3/19 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c语言error c4430,error C4430: 缺少类型说明符 - 假定为 int。 异常怎么解决 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

C/C++ code// RegDemoDlg.cpp : implementation file

//

#include "stdafx.h"

#include "RegDemo.h"

#include "RegDemoDlg.h"

#ifdef _DEBUG

#define new DEBUG_NEW

#undef THIS_FILE

static char THIS_FILE[] = __FILE__;

#endif

/

//注冊(cè)表操作

HKEY hKey;

char content[256]; //所查詢(xún)注冊(cè)表鍵值的內(nèi)容

DWORD dwType=REG_SZ; //定義讀取數(shù)據(jù)類(lèi)型

DWORD dwLength=256;

struct HKEY__*RootKey; //注冊(cè)表主鍵名稱(chēng)

TCHAR *SubKey; //欲打開(kāi)注冊(cè)表項(xiàng)的地址

TCHAR *KeyName; //欲設(shè)置項(xiàng)的名字

TCHAR *ValueName; //欲設(shè)置值的名稱(chēng)

LPBYTE SetContent_S; //字符串類(lèi)型

int SetContent_D[256]; //DWORD類(lèi)型

BYTE SetContent_B[256]; //二進(jìn)制類(lèi)型

int ShowContent (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName);

int SetValue_S (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName,LPBYTE ReSetContent_S);

int SetValue_D (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName,int ReSetContent_D[256]);

int SetValue_B (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName,BYTE ReSetContent_B[256]);

int DeleteKey (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReKeyName);

int DeleteValue (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName);

//查看函數(shù)

ShowContent (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName)

{

int i=0; //操作結(jié)果:0==succeed

if(RegOpenKeyEx(ReRootKey,ReSubKey,0,KEY_READ,&hKey)==ERROR_SUCCESS)

{

if(RegQueryValueEx(hKey,ReValueName,NULL,&dwType,(unsigned char *)content,&dwLength)!=ERROR_SUCCESS)

{

AfxMessageBox("錯(cuò)誤:無(wú)法查詢(xún)有關(guān)的注冊(cè)表信息");

i=1;

}

RegCloseKey(hKey);

}

else

{

AfxMessageBox("錯(cuò)誤:無(wú)法打開(kāi)有關(guān)的hKEY");

i=1;

}

return i;

}

//設(shè)置字符串值函數(shù)

SetValue_S (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName,LPBYTE ReSetContent_S)

{

int i=0; //操作結(jié)果:0==succeed

//int StrLength;

//StrLength=CString(SetContent_S).GetLength();

if(RegOpenKeyEx(ReRootKey,ReSubKey,0,KEY_WRITE,&hKey)==ERROR_SUCCESS)

{

if(RegSetValueEx(hKey,ReValueName,NULL,REG_SZ,ReSetContent_S,CString(SetContent_S).GetLength())!=ERROR_SUCCESS)

{

AfxMessageBox("錯(cuò)誤:無(wú)法設(shè)置有關(guān)的注冊(cè)表信息");

i=1;

}

RegCloseKey(hKey);

}

else

{

AfxMessageBox("錯(cuò)誤:無(wú)法查詢(xún)有關(guān)的注冊(cè)表信息");

i=1;

}

return i;

}

//設(shè)置DWORD值函數(shù)

SetValue_D (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName,int ReSetContent_D[256])

{

int i=0; //操作結(jié)果:0==succeed

if(RegOpenKeyEx(ReRootKey,ReSubKey,0,KEY_WRITE,&hKey)==ERROR_SUCCESS)

{

if(RegSetValueEx(hKey,ReValueName,NULL,REG_DWORD,(const unsigned char *)ReSetContent_D,4)!=ERROR_SUCCESS)

{

AfxMessageBox("錯(cuò)誤:無(wú)法設(shè)置有關(guān)的注冊(cè)表信息");

i=1;

}

RegCloseKey(hKey);

}

else

{

AfxMessageBox("錯(cuò)誤:無(wú)法查詢(xún)有關(guān)的注冊(cè)表信息");

i=1;

}

return i;

}

//設(shè)置二進(jìn)制值函數(shù)

SetValue_B (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName,BYTE ReSetContent_B[256])

{

int i=0; //操作結(jié)果:0==succeed

if(RegOpenKeyEx(ReRootKey,ReSubKey,0,KEY_WRITE,&hKey)==ERROR_SUCCESS)

{

if(RegSetValueEx(hKey,ReValueName,NULL,REG_BINARY,(const unsigned char *)ReSetContent_B,4)!=ERROR_SUCCESS)

{

AfxMessageBox("錯(cuò)誤:無(wú)法設(shè)置有關(guān)的注冊(cè)表信息");

i=1;

}

RegCloseKey(hKey);

}

else

{

AfxMessageBox("錯(cuò)誤:無(wú)法查詢(xún)有關(guān)的注冊(cè)表信息");

i=1;

}

return i;

}

//刪除子項(xiàng)函數(shù)

DeleteKey (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReKeyName)

{

int i=0; //操作結(jié)果:0==succeed

if((RegOpenKeyEx(ReRootKey,ReSubKey,0,KEY_WRITE,&hKey))==ERROR_SUCCESS)

{

if((RegDeleteKey(hKey,ReKeyName))!=ERROR_SUCCESS)

{

//AfxMessageBox("清除指定項(xiàng)失敗!");

i=1;

}

RegCloseKey(hKey);

}

else

{

//AfxMessageBox("錯(cuò)誤:無(wú)法打開(kāi)有關(guān)的hKEY");

i=1;

}

return i;

}

//刪除鍵值函數(shù)

DeleteValue (struct HKEY__*ReRootKey,TCHAR *ReSubKey,TCHAR *ReValueName)

{

int i=0; //操作結(jié)果:0==succeed

if(RegOpenKeyEx(ReRootKey,ReSubKey,0,KEY_WRITE,&hKey)==ERROR_SUCCESS)

{

if(RegDeleteValue(hKey,ReValueName)!=ERROR_SUCCESS)

{

//AfxMessageBox("清除指定值失敗!");

i=1;

}

RegCloseKey(hKey);

}

else

{

//AfxMessageBox("錯(cuò)誤:無(wú)法打開(kāi)有關(guān)的hKEY");

i=1;

}

return i;

}

以下內(nèi)容超長(zhǎng).. 暫時(shí)省略 如需在添加

與50位技術(shù)專(zhuān)家面對(duì)面20年技術(shù)見(jiàn)證,附贈(zèng)技術(shù)全景圖

總結(jié)

以上是生活随笔為你收集整理的c语言error c4430,error C4430: 缺少类型说明符 - 假定为 int。 异常怎么解决的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。