|
Hi,
I need to design an application accessing database system.
I need to design it like a server/mutiple client model in c++.
Can i get any article dealing with the database client/server model.
Thanks
|
|
|
|
|
krishnan.s wrote: Can i get any article dealing with the database client/server model.
Here's one[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
hi all,
I had to include dll with my exe, but my problem is if i keep those dll in my install folder than my project does not work fine. To remove this i have put those dll in new folder inside my installed folder but now my project is not loading those dlls and showing warning
warning LNK4199: /DELAYLOAD:...\test_Folder\abc.dll ignored; no imports found from ...\test_Folder\abc.dll
|
|
|
|
|
You can use SetDllDirectory API to add the new folder to the DLL search path.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
where i can use this?
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Call this when your EXE is initializing.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I have dialog based application
PLease can u explain me with example.
thanks.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
I'm assuming you are loading the DLL using LoadLibrary .
So, before calling LoadLibrary , you must call SetDllDirectory("...\\test_folder") where the parameter is the path of the folder where you have put your DLLs.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
How are you using the DLL? Are you using the companion .lib file to load functions from the DLL or are you using LoadLibrary() and GetProcAddress() combo?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
i m trying like this.
CString FilePath;
CString FolderPath;
TCHAR lpFileName[MAX_PATH+1];
GetModuleFileName(NULL, lpFileName, MAX_PATH);
FilePath = lpFileName;
int nLastIndex = FilePath.ReverseFind('\\');
if (nLastIndex!=-1)
{
FolderPath = FilePath.Left(nLastIndex);
} else
{
FolderPath = _T("\\");
}
CString dll_path=FolderPath;
dll_path=(dll_path+_T("\\test_folder"));
BOOL tt=SetDllDirectory(dll_path);
LoadLibrary(dll_path+"\\Rapi.dll");
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Are you sure SetDllDirectory() and LoadLibrary() are succeeding? You check the return values and use GetLastError() to find what went wrong if one of these functions fail.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I have finished one application which can support xp.but today i tested it on vista,it failed.
in it,thoses registry control fuctions,windows services control fuctions, some bitmap fuctions and some Gdi function fails.
Are there so many differences between those two os?
How can i deal with this?
Thanks in advance.
|
|
|
|
|
tyr2000 wrote: Are there so many differences between those two os?
Yes
tyr2000 wrote: How can i deal with this?
Maybe this[^] might help you, or some of the articles here[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi
I'm converting an existing C++ MFC project in VS2008 to Unicode. The project had previously been upgraded to VS2008 from VS2005 and is running successfully as MBCS built by VS2008. I have also successfully tested a small (new) MFC Unicode app in C++.
I set the Project Properties to "Use Unicode ..." instead of MBCS and did a rebuild. UNICODE and _UNICODE are defined in the Preprocessor directives due to 'Use Unicode ...' in the project properties. When I build I get a lot of errors related to the definition of szFaceName in CHARFORMAT2. The errors are related to the definition of CHARFORMAT szFaceName as 'char' rather than WCHAR. Looking at the definition of CHARFORMAT2 in Richedit.h it has:
#ifdef UNICODE
#define CHARFORMAT2 CHARFORMAT2W
#else
#define CHARFORMAT2 CHARFORMAT2A
#endif
and the CHARFORMAT2A line is the one highlighted - effectively saying that UNICODE is NOT defined.
I am at a loss to understand why UNICODE is undefined in Richedit.h and how to fix it. I have tried defining UNICODE and _UNICODE in stdafx.h without any success.
I'd be grateful for any help with this - its driving me crackers.
Thanks in anticipation
|
|
|
|
|
Selumbei wrote: did a rebuild.
I presume that included deleting and rebuilding your pre-compiled header (.pch) file? That's where the definition of CHARFORMAT2 probably is.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi
I made sure that my project .pch file was gone and tried again without success. However there is a second project in the solution (on which my project is dependent). When I made sure the second project's .pch file was deleted it solved the issue.
So your suggestion was spot on - thanks
Now all I have to do is go through and correct all of the 'real' errors caused by previous developers not using the transmutable macros etc
Thanks again.
|
|
|
|
|
Hi all,
I need to launch a process as the user “Administrator” while running as “SYSTEM”. This is for a Windows XP Embedded application that launches another application, but the new application has to run under the “Administrator” account. It pops up an error message box when executed as “SYSTEM”. (Yes, the "Administrator" XPe component is installed.) Does anyone have any example code that does this or something very similar?
Thanks!
Peni
|
|
|
|
|
You could use the CreateProcessWithLogonW API to do this.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
That's the first thing I tried. It doesn't work. I can't recall exactly what GetLastError() returned, but I know it didn't reveal anything obvious, which is why I was hoping for some example code.
|
|
|
|
|
I am having some problems with the code I am writing.. here is the error message I'm getting:
error C2664: 'getFirst' : cannot convert parameter 1 from 'char (*)[100]' to 'char *'
And here is the code that is involved..
#include <iostream>
#include <cstdlib>
using namespace std;
bool getFirst(char *);
bool getLast(char *);
void main()
{
char firstName[100];
char lastName[100];
bool validFName;
bool validLName;
int first;
int last;
int length;
do
{
cout << "Enter your first name in lowercase letters: ";
validFName = getFirst(&firstName);
if (!validFName) cout << "Invalid entry. Try again...\n";
} while (!validFName);
cout << "\n";
do
{
cout << "Enter your last name in lowercase letters: ";
validLName = getLast(&lastName);
if (!validLName) cout << "Invalid entry. Try again...\n";
} while (!validLName);
cout << "\nYour full name is " << firstName << " " << lastName << "\n";
first = strlen(firstName);
last = strlen(lastName);
length = (first + last);
cout << "\nYour full name has " << length << " characters\n";
}
bool getFirst(char *first)
{
int iF,lenF;
char bufFirst[100];
bool validFirst = true;
cin.getline(bufFirst,100);
lenF = strlen(bufFirst);
iF = 0;
while (validFirst && iF < lenF)
{
if ((bufFirst[iF] < 'a') || (bufFirst[iF] > 'z'))
validFirst = false;
iF++;
}
return validFirst;
}
bool getLast(char *last)
{
int iL,lenL;
char bufLast[100];
bool validLast = true;
cin.getline(bufLast,100);
lenL = strlen(bufLast);
iL = 0;
while (validLast && iL < lenL)
{
if ((bufLast[iL] < 'a') || (bufLast[iL] > 'z'))
validLast = false;
iL++;
}
return validLast;
}
I cannot figure out how to get the correct output.. It displays crazy characters and says that my string length is 330 characters long..
Any help with this please??
|
|
|
|
|
Make the following changes.
validFName = getFirst(firstName);
validLName = getLast(lastName);
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I'm having problems installing the last SDK for V6.00 that I downloaded at:http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm[^]
It seems to get started then IExplore hangs and gives error message. The SDK update runs from a browser as the update is written JAVA SCRIPT.
I could go through the java script and try to figure out where it hangs, there is tons of JAVA code in the install and it would take for ever.
It's probobly a setting in my browser?
Has anybody had this problem or can you give me some ideas on what to try?
Thanks
|
|
|
|
|
Hi, I have a View Class derived from CView, in which I build a Graph. I wanted to be able to rebuild the Graph based on changes in parameters or something. I would have to delete that View window I am assuming before I do a "RebuildGraphPage". How can I delete the windo? Any idea?
I did try Getting Active View window and deleting it, but it caused a crash.
Thanks for any feedback.
|
|
|
|
|
sabdalla80 wrote: How can I delete the windo? Any idea?
Do you mean erasing the background?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks..I got it to work..All I needed actually was to delete the Class object first which is a Graph in this case.
Thanks
|
|
|
|