|
|
When I read part of your post in the response email, I thought it was from the OP.
I was thinking, oh no, this guy's falling apart hehe.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi to All
i have one doubt regarding with my project.
1. I created one DLL file in this DLL file was compiled Visual Studio 2003 and windows XP.
2. Then i want to create that DLL file in Windows Vista but in vista is not compatible for visual studio 2003 (i referred in msdn ) and i do installed service pack of 2003 in XP .Then generating one same DLL.
3. And then i was run that external application in windows vista but that dll could not compiling ..how to solve this problem?
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
rowdy_vc++ wrote: ...dll could not compiling ..how to solve this problem?
What problem?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
yes i know ....in this compiled DLL used in one external application ..its successfully in windowsXP but in Windows vista..its not compiled ..thats why i am saying..
i need ...how to access visual studio 2003 create one dll..in this dll access in vista how?
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
Can't you make one single meaningful post?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
rowdy_vc++ wrote: its not compiled ..thats why i am saying..
And I'm saying, what's the (compiler) problem?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: And I'm saying, what's the (compiler) problem?
It is not "working".
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: It is not "working".
You need to reply "better" than that.
If you can't be bothered giving him a sensible reply, don't expect him to help.
As we're not psychic... how do you "know" it's not working?
Does the compiler crash?
Does it give a message?
Does it claim to succeed, but you can't run the compiled program.
Those are just off the top of my head - I'm sure there are other details you can provide if getting help is at all important to you.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
I now owe you an apology! I thought you were the OP, and missed the joke icon...
I should get more sleep...
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
No worries. Such things happen.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Did the program ran in Vista?
If not, why?. What error happened?.
Please, give more information about it.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
k ..i am working in one java project ..in this java project one small module done by visual c++ its creating one DLL.so we call that dll ..by using java compiler ..its working fine in XP
But in windows Vista its not compile. Because of the compiler problem thats why i regenerate the dll in vista but visual studio .net 2003 is not compatible for vista (referred in msdn) but i want to use that dll how to solve this problem...
requirements: Dont use VS2005
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
Why you need to compile the DLL again?.
If it runs in XP usually should run in Vista.
However, if you are trying to compile the the DLL and you can't, will help a lot, the messages the compiler throws to understand why. We can't guessing what problem you have.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
In C++ i am creating a mutex to guard the writing to a file.
I have 4 threads that call a method in a .dll. The method in that dll, will write to a file when needed. I have a questions surrounding the mutex. First off :
1. Do i use CreateMutex or OpenMutex
2. If i use CreateMutex, can someone guide me on where to find the
attribute list for the 1st parameter.
3. On both Create and Open Murtex, the last parameter 'LPCSTR' is supposed
to be a name of the mutex. Can i just create any name? Should it
be a GUID?
Thanks in advance
|
|
|
|
|
LCI wrote: I have 4 threads that call a method in a .dll
If you want only intraprocess synchronisation, IMHO then go for CriticalSection, and don't bother about the Mutex questions.
|
|
|
|
|
I used this same concept for writing to another file and had no issues.
Here is what i do:
HANDLE hmutex = OpenMutex(MUTEX_ALL_ACCESS. FALSE, TEXT("2354fg-45gefgg"));
if (NULL != hMUTEX)
{
WaitforSingleObject(hMutex, INFINITE);
Begin writing to file
}
ReleaseMutex(hMutex);
CloseHandle(hMutex);
Looks like the mutex returns null so i never get to write to my file.
Maybe there is something wrong with the name(third parameter)??
|
|
|
|
|
OpenMutex get the mutex Handle for an existing mutex. You must have a Mutex Created with CreateMutex. what about Critical section?
|
|
|
|
|
|
LCI wrote: 1. Do i use CreateMutex or OpenMutex
In the thread initializations, use CreateMutex(). If the mutex already exists then you'll get a
handle to it and GetLastError() returns ERROR_ALREADY_EXISTS. If it's a new mutex you'll still get
a handle to it.
As others have mentioned, you don't need a named mutex if your threads are all in the same process -
which includes your DLL.
LCI wrote: 2. If i use CreateMutex, can someone guide me on where to find the
attribute list for the 1st parameter.
Windows security is beyond the scope of this board, but there is documentation[^]
Pass NULL if in doubt.
LCI wrote: . On both Create and Open Murtex, the last parameter 'LPCSTR' is supposed
to be a name of the mutex. Can i just create any name? Should it
be a GUID?
You can use a GUID (converted to a character string). Any unique string.
But again, no need for a named mutex if you only have one process - you can use a critical section instead.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
I have a TCHAR string i want to retrieve first element of this string.
Which API i should use for getting this....
Thanks in advance
|
|
|
|
|
TCHAR firstChar = yourTCharString[0];
|
|
|
|
|
neha.agarwal27 wrote: i want to retrieve first element of this string.
what do you mean by element, may be the first token seperated by delimiters.
Specify exactly what you need.
|
|
|
|
|
pls help me to Get the caption of active window...
::GetActiveWindow()->GetWindowText(strCap); //ERROR
error C2039: 'GetWindowTextA' : is not a member of 'HWND__'
c:\program files\microsoft visual studio\vc98\include\windef.h(195) : see declaration of 'HWND__'
|
|
|
|