惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

博客园 - 流云

编译时找不到xxx.pch [ZT] SQL Server 中四种匹配符的含义[ZT] TAB ORDER按回车键下个控件自动获得焦点 VC获取系统时间、程序运行时间 - 流云 - 博客园 VC常用数据类型使用转换详解 [转] - 流云 - 博客园 VC遍历文件夹下所有文件和文件夹 - 流云 - 博客园 对话框与其控件的颜色 获得指针(文档、视图、框架) 让对话框中的菜单变灰(根据可用性而显示) 用VC++修改注册表----让我们踏出第一步(适合初学者) VC+ADO 连接ACCESS和SQL SERVER的方法 动态链接库DLL的编写和调用(四则表达式计算) SQL SERVER 数据库备份还原 列表控件ListCtrl的使用 文本读写 CStdioFile流文件 文件读写 CFile 字体对话框FontDialog 颜色对话框ColorDialog VC获取系统时间、程序运行时间
获取 本机 SQL SERVER 服务器名 - 流云
流云 · 2005-05-26 · via 博客园 - 流云

CString strSQLSrvName;//
    HKEY hKEY; 
    LPCTSTR data_Set
="SOFTWARE\\Microsoft\\MSSQLServer\\MSSQLServer\\CurrentVersion\\"
    
long ret0=(::RegOpenKeyEx(HKEY_LOCAL_MACHINE,data_Set, 0, KEY_READ, &hKEY)); 
    
if(ret0 == ERROR_SUCCESS)  
    {        
        LPBYTE owner
=new BYTE[80]; 
        DWORD type
=REG_SZ ; DWORD dData=80;  
        
long ret=::RegQueryValueEx(hKEY, "RegisteredOwner", NULL,&type, owner, &dData); 
        
if(ret == ERROR_SUCCESS)     
            strSQLSrvName
=CString(owner); 
        delete[] owner;
        AfxMessageBox("Your SQL SERVER's name is:"+strSQLSrvName);    }
    ::RegCloseKey(hKEY); 
//就不解说了吧,拿去运行一下就知道了~