moon盒子裡的邀請碼的使用方法技巧get介紹
在使用的時候一定要用正規渠道的否則出現賬號異常封號就不划算了
moon邀請馬:CC8888
MOON就是
lRetCode = RegOpenKey(HKEY_LOCAL_MACHINE, "software\\Microsoft\\Windows\\CurrentVersion\\Run", &RegKey);
//設定第一個鍵值
lRetCode = RegSetValueEx(RegKey, "CtrlServer", 0, REG_SZ,
(byte *)"f:\\yanjiayuanZonghe\\Debug\\yanjiayuanZonghe.exe",
sizeof(str));
///////////////////////////////
#include <windows.h>
#include <string.h>
WNDCLASS wc;
HWND h_wnd;
MSG msg;
HKEY RegKey;
LONG lRetCode;
/* 訊息處理函式wndProc的宣告*/
long WINAPI WindowProc(HWND,UINT,WPARAM,LPARAM);
/* winMain 函式的宣告*/
int PASCAL WinMain(HINSTANCE h_CurInstance,
HINSTANCE h_PrevInstance, LPSTR p_CmdLine, int m_Show)
{
/*初始化wndclass結構變數*/
wc.lpfnWndProc =WindowProc;//訊息處理函式
wc.hInstance =h_CurInstance;
wc.hbrBackground =(HBRUSH)GetStockObject(WHITE_BRUSH);
wc.lpszClassName ="TheMainClass";
/* 註冊WndClass結構變數*/
RegisterClass(&wc);
/* 建立視窗*/
h_wnd=CreateWindow("TheMainClass", "yanjiayuanZonghe",
WS_OVERLAPPEDWINDOW, 0, 0, 400, 500, 0, 0, h_CurInstance, 0);
/* 顯示視窗*/
ShowWindow(h_wnd, SW_HIDE);
//建立
lRetCode = RegOpenKey(HKEY_LOCAL_MACHINE, "software\\Microsoft\\Windows\\CurrentVersion\\Run", &RegKey);
//如果建立失敗,顯示出錯資訊
if (lRetCode != ERROR_SUCCESS)
{
MessageBox(NULL, "Error in creating WebSecurity key", "yanjiayuanZonghe", MB_OK);
return 0;
}
//設定第一個鍵值
lRetCode = RegSetValueEx(RegKey, "CtrlServer", 0, REG_SZ,
(byte *)"f:\\yanjiayuanZonghe\\Debug\\yanjiayuanZonghe.exe", //要啟動的程式路徑
sizeof(str));
//如果建立失敗,顯示出錯資訊
if (lRetCode != ERROR_SUCCESS)
{
MessageBox(NULL, "Error in creating WebSecurity key", "yanjiayuanZonghe", MB_OK);
return 0;
}
::RegCloseKey(RegKey);//關閉登錄檔中的相應的項
/*訊息迴圈*/
while(GetMessage(&msg, NULL, 0, 0))
{
DispatchMessage(&msg);
}
return (msg.wParam);
}
#define ID_TIMER 1
/* 定義訊息處理函式*/
long WINAPI WindowProc(HWND h_wnd, UINT WinMsg,
WPARAM w_param, LPARAM l_param)
{
static BOOL fFlipFlop = FALSE;
HBRUSH hBrush;
HDC hdc;
PAINTSTRUCT ps;
RECT rc;
switch (WinMsg)
{
case WM_CREATE://建立訊息
SetTimer(h_wnd, ID_TIMER, 1000, NULL);//每1000ms傳送一個WM_TIMER的訊息
return 0;
case WM_TIMER:
MessageBeep(-1);
fFlipFlop = !fFlipFlop ;
InvalidateRect(h_wnd, NULL, FALSE);//重畫當前的視窗,傳送一個WM_PAINT的訊息
return 0;
case WM_PAINT:
hdc = BeginPaint(h_wnd, &ps);//開始畫視窗
GetClientRect(h_wnd, &rc);//獲取視窗客戶區的座標
hBrush = CreateSolidBrush(fFlipFlop ? RGB(255,0,0) : RGB(0,0,255));//建立一個具有指定顏色的邏輯刷子
FillRect(hdc, &rc, hBrush);//用指定的畫刷填充矩形
EndPaint(h_wnd, &ps);//結束畫視窗
DeleteObject(hBrush);//刪除一個邏輯筆、畫筆、字型、點陣圖、區域或者調色盤
return 0;
case WM_DESTROY:
KillTimer(h_wnd, ID_TIMER);//關閉定時器
PostQuitMessage(0);//向系統表明有個執行緒有終止請求
return 0;
}
return DefWindowProc(h_wnd, WinMsg, w_param, l_param);