Click here to Skip to main content
16,004,991 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Checking File Access Pin
basementman30-May-03 9:46
basementman30-May-03 9:46 
GeneralProblem with recursion - Please Help !! Pin
Snakebyte29-May-03 22:02
Snakebyte29-May-03 22:02 
QuestionHow to link project with mfc42 but not mfc70? Pin
kydfru29-May-03 21:18
kydfru29-May-03 21:18 
AnswerRe: How to link project with mfc42 but not mfc70? Pin
Joaquín M López Muñoz29-May-03 21:28
Joaquín M López Muñoz29-May-03 21:28 
GeneralNot acceptable in my situation.... Pin
kydfru29-May-03 22:22
kydfru29-May-03 22:22 
AnswerRe: How to link project with mfc42 but not mfc70? Pin
John R. Shaw30-May-03 8:33
John R. Shaw30-May-03 8:33 
Questionhow can i get the SQL Server name? Pin
Peter Keung29-May-03 21:17
Peter Keung29-May-03 21:17 
AnswerRe: how can i get the SQL Server name? Pin
auleaf30-May-03 2:53
auleaf30-May-03 2:53 
Variant SQLServer;
Variant ServerList;
int i,nServers;
String sRetValue;
try
{
SQLServer = CreateOleObject("SQLDMO.Application");
}
catch(...)
{
ShowMessage("no SQL Server or SQL Server client!");
return;
}

ServerList= SQLServer.OleFunction("ListAvailableSQLServers");
nServers=ServerList.OlePropertyGet("Count");
ComboBox1->Items->Clear();
for(i=1;i<=nServers;i++)
ComboBox1->Items->Add(ServerList.OleFunction("Item",i));
SQLServer=Unassigned;
ServerList=Unassigned;

///////////////////////////////////

other:
int i;
LPSERVER_INFO_101 pBuf = NULL;
LPSERVER_INFO_101 pTmpBuf;
DWORD dwLevel = 101;
DWORD dwPrefMaxLen = MAX_PREFERRED_LENGTH;
DWORD dwEntriesRead = 0;
DWORD dwTotalEntries = 0;
DWORD dwTotalCount = 0;
DWORD dwServerType = SV_TYPE_SQLSERVER; // SQL server
DWORD dwResumeHandle = 0;
NET_API_STATUS nStatus;
wchar_t *pszServerName = NULL;
try
{
nStatus = NetServerEnum(pszServerName,
dwLevel,
(LPBYTE *) &pBuf,
dwPrefMaxLen,
&dwEntriesRead,
&dwTotalEntries,
dwServerType,
NULL,
&dwResumeHandle);
if ((nStatus == NERR_Success) || (nStatus == ERROR_MORE_DATA))
{
if ((pTmpBuf = pBuf) != NULL)
{
for (i = 0; i < dwEntriesRead; i++)
{
assert(pTmpBuf != NULL);

if (pTmpBuf == NULL)
{
return;
}
SList->Add((AnsiString)pTmpBuf->sv101_name);
pTmpBuf++;
dwTotalCount++;
}
}
}
if (pBuf != NULL)
NetApiBufferFree(pBuf);
}
catch(...)
{}
GeneralRe: how can i get the SQL Server name? Pin
Peter Keung30-May-03 4:49
Peter Keung30-May-03 4:49 
AnswerRe: how can i get the SQL Server name? Pin
David Crow30-May-03 2:59
David Crow30-May-03 2:59 
GeneralRe: how can i get the SQL Server name? Pin
Peter Keung30-May-03 3:32
Peter Keung30-May-03 3:32 
GeneralRe: how can i get the SQL Server name? Pin
David Crow30-May-03 3:58
David Crow30-May-03 3:58 
GeneralRe: how can i get the SQL Server name? Pin
basementman30-May-03 9:48
basementman30-May-03 9:48 
AnswerRe: how can i get the SQL Server name? Pin
auleaf2-Jun-03 21:54
auleaf2-Jun-03 21:54 
GeneralStandard mapping mode - MM_TEXT Pin
Daniel Strigl29-May-03 20:25
Daniel Strigl29-May-03 20:25 
GeneralQuestion about the new features in VS.Net 2003 Pin
Link260029-May-03 18:50
Link260029-May-03 18:50 
GeneralRe: Question about the new features in VS.Net 2003 Pin
valikac30-May-03 6:24
valikac30-May-03 6:24 
GeneralRe: Question about the new features in VS.Net 2003 Pin
MAAK30-May-03 11:25
MAAK30-May-03 11:25 
Questionhow to add,modify and delete data. Help me!!! Pin
siong29-May-03 17:15
siong29-May-03 17:15 
AnswerRe: how to add,modify and delete data. Help me!!! Pin
David Crow30-May-03 3:01
David Crow30-May-03 3:01 
QuestionVC++ 6 Linking Error? Pin
The Unknown29-May-03 17:04
The Unknown29-May-03 17:04 
AnswerRe: VC++ 6 Linking Error? Pin
Dave Bryant29-May-03 18:51
Dave Bryant29-May-03 18:51 
GeneralRe: VC++ 6 Linking Error? Pin
The Unknown30-May-03 9:08
The Unknown30-May-03 9:08 
GeneralDLL Question Pin
Stan the man29-May-03 16:02
Stan the man29-May-03 16:02 
GeneralRe: DLL Question Pin
Hesham Amin29-May-03 21:16
Hesham Amin29-May-03 21:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.