|
They say that you should install MDAC 2.6 first, then Jet 4.0 SP3. Unfortunately, the KB article link on Jet download page is broken, so I can't give you more detailed info.
If problem persists, I'd try to install MDAC 2.5 - it comes with Jet.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Still no luck...
What do you guys think of the idea of migrating my application to using ADO instead of DAO... I'm thinking of re-writing the code to use ADO instead of DAO...but i'm currently using DAO to access DBASE database files. Is this possible with ADO?
Would my application be easily distributed to clients using ADO instead of DAO?
I'm willing to do anything to get this problem fixed!
Rob
|
|
|
|
|
I'm trying to write a program to get my machines system properties.
I need to find:
-Total Free Memory
-Total Memory
-Total Free Hard disk space
-Total Hard Disk space
-processor speed
if anyone knows if there is a header file or a standard set of functions to do this, please let me know.
Thanx,
Stan
Stan
|
|
|
|
|
Hi,
Help, I can't seem to get this code right.. it's part of a file loading routine, what I am trying to do is basically find the 'fieldname', and fill 'out' with the next line that comes after it.. It works if the fieldname is present, however, if the fieldname is not present in the input file, the routine just gets stuck in the do..while loop, all help is appreciated!!
bool pPolyhedra::getfield(char *fieldname, CString& out)
{
CString a;
// Eat lines untill we encounter the fieldname, or after we have exhausted the file
do
{
ifile->getline(linebuffer, 255, '\n');
a=linebuffer;
} while (a.Find(fieldname)==-1 || ifile->eof());
if (!ifile->eof())
{
ifile->getline(linebuffer, 255, '\n');
out=linebuffer;
out.TrimRight();
return true;
}
return false;
}
|
|
|
|
|
Assuming your ifile->eof() function performs a valid test for end of file, try it this way:
bool pPolyhedra::getfield(char *fieldname, CString& out)
{
BOOL bFoundField = FALSE;
while (!ifile->eof())
{
ifile->getline(linebuffer, 255, '\n');
a = linebuffer;
if (a.Find(fieldname) == -1)
{
bFoundField = TRUE;
break;
}
}
if (!bFoundField)
{
return FALSE;
}
ifile->getline(linebuffer, 255, '\n');
out = linebuffer;
out.TrimRight();
return true;
}
If it were me, I'd also use the MFC CStdioFile class for reading the file.
|
|
|
|
|
Hi,
I'm creating an NT Service class. I'm having trouble making it shutdown.
It responds to the SERVICE_CONTROL_STOP message okay but when it receives the SERVICE_CONTROL_SHUTDOWN message it doesn't terminate at all.
I'm running it on NT Server 4.0 no service packs.
Does anyone know of anything special I need to do to shutdown my service. Any help would be appreciated.
Thanks for reading.
Flit.
|
|
|
|
|
Hi there!
I have created an owner-drawn listbox which I am using to wrap text in the same string onto a new line, so that all of the lines containing the string can be selected at once.
However, I cannot seem to use tabstops!? Guessing it is to do with the fact that it is an ownerdrawn listbox...?
Anyway, I don't know where to handle this issue - the MFC code and MSDN are crap and don't mention anything about this, in the context of ownerdrawn stuff. Can anyone help please?
Yours very frustratedly!
Baz
|
|
|
|
|
Did you specified DT_EXPANDTABS flag in call to DrawText inside OnDrawItem handler?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Cheers for that! Got it sorted now...
|
|
|
|
|
Hello, I'm trying to hide that messageboxes, using:
SetErrorMode(SEM_FAILCRITICALERRORS);
this makes some of the messageboxes to appear, I've thought to use:
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
but then I get worse results, how should I do this?
Note: after all the process the system hangs.
Notes about the process:
CreateFile(...);
CreateDirectory(...);
for (...) { CopyFile(...); }
CloseHandle(...);
As always, thank you in advance.
|
|
|
|
|
It may be not related to the msgbox problem, but why are you keeping some file open during series of CopyFile calls?
Please post code with real parameters instead of "..."; This will make diagnosing easier.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
uiErrorModeANT = SetErrorMode(SEM_FAILCRITICALERRORS);
hArxiuLog = CreateFile (filename,GENERIC_WRITE,FILE_SHARE_WRITE | FILE_SHARE_READ,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_ARCHIVE,NULL);
if (hArxiuLog != INVALID_HANDLE_VALUE)
{
dwFileSize = GetFileSize(hArxiuLog,NULL);
SetFilePointer (hArxiuLog, dwFileSize, NULL, FILE_BEGIN);
::CreateDirectory(TCCApp.GetAccesRegistre()->GetRefsPathRespatllar(),NULL);
::CreateDirectory(TCCApp.GetAccesRegistre()->GetProgramesPathRespatllar(),NULL);
iLimit = dlgPare->m_clbRestantsRespatllar.GetCount();
while ((iComptador < iLimit) && (!dlgPare->m_bCancelThread) && (!bTrobatError))
{
dlgPare->m_clbRestantsRespatllar.GetText(0,dlgPare->m_vstatRespatllantACT);
dlgPare->m_clbRestantsRespatllar.DeleteString(0);
dlgPare->UpdateData(FALSE);
dlgPare->m_clbRestantsRespatllar.RedrawWindow();
// the paths change in each loop iteration (here's not that piece of code...
iRetornOperacioCopia = CopyFile(csFullPathOrigenReferencia, csFullPathDestiReferencia, FALSE);
if (iRetornOperacioCopia == 0)
{
iErrorsTrobats++;
csAuxiliar += " : registrado error en éste proceso";
bTrobatError = true;
}
iComptador++;
}
// Posicionar el punter en l'arxiu (anar al final...)
dwFileSize = GetFileSize(hArxiuLog,NULL);
SetFilePointer (hArxiuLog, dwFileSize, NULL, FILE_BEGIN);
// csArxiuLog is a String that changes in each copy operation.
WriteFile(hArxiuLog,csArxiuLog,strlen(csArxiuLog),&dwNBWritten,NULL);
CloseHandle(hArxiuLog);
csArxiuLog.ReleaseBuffer(0);
}
// Get back to the original err mode.
SetLastError(0);
SetErrorMode(uiErrorModeANT);
|
|
|
|
|
when exactly messageboxes are displayed? During CopyFile?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hello, I'm trying to get some data written into the registry when the user updates a password in my app.
I'm using:
RegOpenKeyEx(HKEY_LOCAL_MACHINE,csPathSubClau,0,KEY_ALL_ACCESS,&Key);
RegSetValueEx(hKey,csValor,0,REG_SZ,(BYTE *)csNouValor.GetBuffer(iLength),iLength);
RegFlushKey(hKey);
RegCloseKey(hKey);
but the data is only flushed when I close my app, could you give me an idea?
thank you in advance.
|
|
|
|
|
I want to extract the first char from a string and test if it is equal to an int in a for loop.
char c;
for (int i=1, i
|
|
|
|
|
cast it.
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
how to ?
tried this
for ((int)c == i)
it still doesnt work....
|
|
|
|
|
Oh, I see. The code snippet you posted was broken, so I didn't spot exactly what you wanted to do. I just compiled this no worries:
<br />
<br />
char c = 'c';<br />
<br />
for (int i = 0; i < 255;i++)<br />
{<br />
if ( i == (int)c) break;<br />
}<br />
<br />
for (int j = 0; j < i; j++)<br />
printf("c");<br />
so I'd suggest you create a new int, and make it equal to (int) c, then make a loop of it. If ( as I assume, otherwise there would be no point ) you want to output this character, you need merely say c = z ( assuming z is the (int) of c to start with in the loop ) and it should work. You MAY need to make c a char * with two elements to ensure element 2 is a 0 though.
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
You don't need to do anything. The char will be implicitly converted to an int (look up "integral promotion" in your help docs) to do the comparison.
--Mike--
http://home.inreach.com/mdunn/
Tables, ladders, chairs, OH MY!
|
|
|
|
|
Someone can tell me the exact role of this ?
Thank
Yuri
|
|
|
|
|
Hi folks,
i have an environment where the server is unix and the workstations are Windows NT. Now the admin wants to send smtp-messages to the workstations. (like "i will shutdown the server in 10 seconds") i think this means i have to write small smtp-servers on all workstations which do nothing more than listen on port 25 for incoming mails, recieve them and pop them up on the screen. Anyone out there who has ever done something like this? Any help would be appriciated!
|
|
|
|
|
SMTP is not suitable for this purpose. It's for sending email, not popup notifications. Tell your administrator to find a better protocol, or define one himself.
|
|
|
|
|
Yep, it sounds like you need to use Net Send from the command prompt. but I would not know how to implement this from the UNIX side. He could just send the notification from the NT Server\Domain.
Giles
|
|
|
|
|
Dear All,
I have been stuckup by a problem i want to change the bakgroud color
of each indiviudal cell of the grid control
can any one help me on this
Sumanth Kalidindi
Hyderabd
|
|
|
|
|
Greetings,
Status: Large graphics intense project using C and Win32 with the GDI
Problem: After short periods of use the client area stops repainting correctly (partial repaint 1/3 of client area). Afterwords most of windows graphics functions are messed up and menus and stuff can't redraw
System: Windows NT 4.0 sp4, Visual C++ 6.0 sp5, 1GB RAM.
Help solving this problem would greatly be apreciated (I have it narrowed to one function) out of 120,000 lines of code
Please mail me if you have any ideas (message queue, GDI issues....)
Randy@NeuronEntertainment.com
Sincerely,
Randy Trulson
|
|
|
|