0
点赞
收藏
分享

微信扫一扫

GetEnvironmentVariable

佳简诚锄 2023-06-16 阅读 208


TCHAR temp_buf[256];
	DWORD rs=GetEnvironmentVariable(TEXT("av"),temp_buf,255);
	if(rs)
	MessageBox(NULL,temp_buf,TEXT("TEMP"),MB_OK);
	else
	{
		BOOL as=SetEnvironmentVariable(TEXT("av"),TEXT("Jpanese"));
		if(as)
		{
			DWORD rs=GetEnvironmentVariable(TEXT("av"),temp_buf,255);
			if(rs)
			MessageBox(NULL,temp_buf,TEXT("av"),MB_OK);
		}
	}

	return 0;
}



举报
0 条评论