|
raj1576 wrote: My problem is that how i find the progress of the file
You could use CInternetFile's Open and Read method to write the file yourself, giving you the ability to easily calculate the progress.
Also try using CInternetSession::OnStatusCallback[^] for status updates.
|
|
|
|
|
Thanks for reply
I tried Also Open and Read method but this is synchronous but I want asynchronous. so I use CFtpConnection. I also tried OnStatusCallback but I am not getting how I use this callback function.Pls help somithing for using this callback function.
|
|
|
|
|
|
|
Hi all,
i have made a dll i want to use that dll in my program i have called the function of that dll using this code
typedef void (*function1_ptr) ();
function1_ptr function1=NULL;
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
HMODULE myDll = LoadLibrary("myfile.dll");
if(myDll)
{
function1 = (function1_ptr) GetProcAddress(myDll,"function1");
if(function1)
function1();
FreeLibrary(myDll);
}
return 0;
}
i have copied my dll in debug folder, but control is not going inside if statement...
how should i do it....
can anybody please help me...
Thanks in advance
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Try giving full path in LoadLibrary.
HMODULE myDll = LoadLibrary("myfile.dll");
to something like
HMODULE myDll = LoadLibrary("C:\\Myproject\\debug\\myfile.dll");
|
|
|
|
|
What the error return code you are getting from LoadLibrary function?
|
|
|
|
|
GetProcAddress(myDll,"function1");
maybe the 2nd parameter is the key.
you could use "dumpbin /exports myfile.dll" to check the exported functions' name.
then,give the right name string.
i think your dll should include .def file
modified on Tuesday, December 29, 2009 3:16 AM
|
|
|
|
|
Le@rner wrote: but control is not going inside if statement...
Which one ? The one after the call to LoadLibrary or the one after the call to GetProcAddress ? If this is the second call, make sure that you have provided a module defintion file (.def file) as explained in the documentation[^]
|
|
|
|
|
hi:
How to generate random file names? It is better provide a simple method. thanks 
|
|
|
|
|
Have you tried GetTempFileName() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"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
|
|
|
|
|
|
UINT GetTempFileName(
LPCTSTR lpPathName, // pointer to directory name for temporary
// file
LPCTSTR lpPrefixString, // pointer to filename prefix
UINT uUnique, // number used to create temporary filename
LPTSTR lpTempFileName
// pointer to buffer that receives the new
// filename
);
I am not a genius, but shed more sweat!
|
|
|
|
|
Filename extension from .tmp to .txt or another? how to do
|
|
|
|
|
Find .tmp and replace it to .txt in the generated filename string 
|
|
|
|
|
May I get filename which like *.txt directly using GetTempFileName() 
|
|
|
|
|
Did you read the docs? It plainly states that a .tmp extension will be used.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
Because I used multi-inheritance in my application. I can not use MFC default file serialization. I have to implement file saving and reading function myself.
My question is how to save/read a class information to/from file.
If I save a class information with class name and its property into the file. How do I know the character string in the file is a class name or not?
Thanks,
|
|
|
|
|
|
I got an error:
\utility\std_serialize.h(102) : error C2039: 'hash_map' : is not a member of 'std'
Thanks
|
|
|
|
|
Try adding #include <hash_map> in std_serialize.h .
modified on Monday, December 28, 2009 10:44 PM
|
|
|
|
|
«_Superman_» wrote: Try adding #include in std_serialize.h.
Maybe you want to write a space between "<", "Whatever" and ">" if not, there is nothing to include in your answer
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
yes, that helps. The official stance is to check the "Encode HTML tags when pasting" checkbox underneath the edit box.
|
|
|
|
|
I always forget to use the HTML escape tags while typing.
Because of this I had requested a new window appear when typing code.
Hopefully we will see this feature in the near future.
|
|
|
|
|
Just use the "Preview" button before final posting.
|
|
|
|