|
At a minimum starting point:
class CBinaryFile
{
public:
CBinaryFile();
~CBinaryFile();
Add( LPCSTR lpBinaryFile, LPCSTR lpInputFile, LPCSTR lpEncryptionKey, LPCSTR lpPublicKey );
Extract( LPCSTR lpBinaryFile, LPCSTR lpFileId, LPCSTR lpPrivateKey, LPCSTR lpPath );
private:
std::string m_strBinaryFile;
std::string m_strInputFile;
std::string m_strFileId;
std::string m_strEncryptionKey;
std::string m_strPublicKey;
std::string m_strPrivateKey;
std::string m_strPath;
}; The downside to e-mailing me directly is that you are the only beneficiary. Keep the Q&A here so that all may benefit.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Ok David, sorry
i'm waiting
|
|
|
|
|
moody123 wrote: i'm waiting
For what?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi david,
Sorry but i forgot to ask you about (LPCSTR) what is this?
|
|
|
|
|
moody123 wrote: Sorry but i forgot to ask you about (LPCSTR) what is this?
const char *
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi All,
I have one com+ exe and one .net service is importing its function to begin the process, now how can i debug my exe, i mean to set a breakpoint or what whenever the service call my exe?
I tried with attach to process but i didnt see any process running.So please give me the way....
Thanks A Ton
Ash_VCPP
|
|
|
|
|
Have you tried Debug.Assert(false) in start of the service. Similarly you can place ASSERT(false) in those COM exes when that segment executed a modal dialog box would appear, you can load that in visual studio.
Regards,
Mushtaque Nizamani
|
|
|
|
|
Hi,
When i installed Rational clearcasetool and restarted system..and when im trying to build my vc++ application in VS 2005 im able to see the below error..
error result returned from 'cl.exe'.
Please help me out..
|
|
|
|
|
cl.exe is the compiler. make the window bigger, or scroll up, and find your missing semicolons.
|
|
|
|
|
Hi friend,
I would like to share several variables between two different processes.
I share a variable between two instances of one application using "#pragma section", I don't know whether I can use "#pragma section" to share variables between two processes or not.
However, please help me how can I share a variable between two different processes?
Thanks in advance.
|
|
|
|
|
If you need to communicate between two different applications, you can have a look at the IPC section[^] on codeproject (IPC=Inter-process communication).
If you want some advice about which technology to use, then you will need to describe what you want to do with more details. Why do you need to share those variables ?
|
|
|
|
|
Hi,
Since I have two applications, the first one is the writer and the second one is the reader and I want to share a memory between them instead of transferring through Messages.
I want to know how to share a memory between these two processes.
Is IPC (Inter-Process Communication) sufficient for me?
Thanks.
|
|
|
|
|
IPC is a generic term regrouping several techniques: sockets, memory-mapped files (shared memory), messages, ...
In your case, what do you want to do exactly ? Is the value of the variable changing ?
|
|
|
|
|
Yes, the data in the variables are changed every 1 second and another application needs to read the recently changed values.
|
|
|
|
|
If the application which should read the data has a message queue (win32 or MFC application for instance), you can use the WM_COPYDATA message. A tutorial here[^]
|
|
|
|
|
|
Hello,
I am using a CAnimateCtrl to show an animation during some lengthy operations (multiple calls to CreateProcess), but the problem is that my animation does not play, because the thread is obviously stuck with CreateProcess. So I need to run the animation in a seperate thread, but am not sure which is the best and shortest way to do this. Is there any good example how this can be achieved?
|
|
|
|
|
I think you should do it the other way around: as your CAnimateCtrl is part of the UI, it should be processed in the main UI thread. Instead, why don't you run your lenght operation in a separate thread ?
|
|
|
|
|
Hi,
I have tried this, but it doesn't work right. I have mutlitple calls to Createprocess, and the problem is that I have to wait for each processto finish until I can start the next one. This is what my code looks like, and I definitely need to ait for the process to finish. Any idea how the animation can run parallely to this code? Thanks alot:
if (!CreateProcess(
strFullPath.GetBuffer(0),
strCmdLine.GetBuffer(0),
NULL,
NULL,
FALSE,
0,
NULL,
GetPathOnly(strFullPath),
&si,
&pi )
)
{
...
return;
}
DWORD nRet;
MSG msg;
while (nRet = MsgWaitForMultipleObjects(1, &pi.hProcess, FALSE, INFINITE, QS_PAINT | QS_SENDMESSAGE |QS_MOUSEBUTTON ) != WAIT_OBJECT_0)
{
if (nRet == WAIT_OBJECT_0 + 1)
{
while (PeekMessage(&msg, 0, WM_PAINT, WM_PAINT, PM_REMOVE))
{
DispatchMessage( &msg );
}
while (PeekMessage( &msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE ));
}
else if (nRet == WAIT_OBJECT_0)
{
break;
}
OnPaint();
}
|
|
|
|
|
Erik wrote: I have tried this, but it doesn't work right.
You have tried what ? Starting a new thread and spawning your processes from within that thread ? It seems not really what you did. If you do that in a separate thread, you don't have to worry about pumping the message queue or repainting or window.
|
|
|
|
|
Hello,
I am facing a strange problem in my c Windows application sigle-threaded, using VS2008 compiler.
errno is used after system calls to identfiy if any error occured. I have placed checks in my code at various places to know if any exception has occured during a flow.
In one of the function, At the beginning of a code block I check for errno occured in previous code block, if errno is zero, the normal flow continues. If errno is non-zero, nothing is done and the function returns with errno.
Now, i found out a strange issue, errno that is initialized to 0 at the start of the function, changes its value to 9 after doing a sprintf call. sprintf call is successfull though. Another strange thing about it is that this happens only when the exe is run as service on Windows Vista. If the same exe is run from Visual Studio debugger, this behavior doesn't happen when exe runs from VS directly in either release or debug mode.
I can not comprehend the behavior, any help will be appreciated.
Thanks.
Gajendra
Gajendra
|
|
|
|
|
No answers at all....Surprising.
Gajendra
|
|
|
|
|
Ok..so nobody knows it....
Gajendra
|
|
|
|
|
Hello,
I am using Vistual Studio 2005, and want to implement a CAnimateCtrl to my dialog-based application. However, I cannot figure out how I can insert a small AVI file as a resource to my project, everything I tried so far fails. What is the right way to add an AVI resource?
|
|
|
|
|