|
DavidCrow wrote: So is the source file empty?
Yes, as in 0 bytes. And how do i open it in passive mode? I didnt see an option for it.
|
|
|
|
|
dellthinker wrote: And how do i open it in passive mode?
Use INTERNET_FLAG_PASSIVE flag for dwFlags parameter.
Regards,
Vijay.
God may not give us what we 'want', but he surely gives us what we 'need'.
|
|
|
|
|
Well that seemed to do the trick. However i ran Wireshark and it doesnt exactly request PASV before sending. *shrugs* We dont explain why it works that way. It just works! Thanx for your replies, i've been at it for ages and now i can finally move on to the next option task
|
|
|
|
|
dellthinker wrote: Yes, as in 0 bytes.
So if the source file is 0 bytes and the destination file is 0 bytes, what's the 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
|
|
|
|
|
Sorry i read that wrong. The file on my machine was 1kb. And before i added the INTERNET_FLAG_PASSIVE argument it would upload the file, but on the ftp server it would be 0KB when the original file was 1kb
|
|
|
|
|
I am trying to use the Win32 debugging functions.
The problem arises that the target process always dies when I detach the debugger with "DebugActiveProcessStop()".
Even if I previously call "DebugSetProcessKillOnExit( FALSE )", the target process still exits.
Does anyone have any experience with these functions?
|
|
|
|
|
Hey Friends
I am trying to run an exe which creates a window.
Now i do not want the window to be visible.
Is there any way to do it?
::ShellExecute(0,"Open","myapp.exe",0,0,SW_HIDE);
even using above it displays the window & does not hides it
Regards
|
|
|
|
|
Ultimately, the app being started has control of whether it shows or hides.
Look at your startup code... CWinApp has a var called m_nCmdShow which contains the intended app startup (your SW_HIDE) -- it's up to you to use it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
Get the Handle of tht window and hide it using ShowWindow(FALSE)..
ThankXXXXXXXXXXxx
|
|
|
|
|
Hi.
I need to call a .net dll from my (unmanaged) vs6 C++ project.
Has anyone done this and could you show me how?
Thanks.
|
|
|
|
|
See Here[^]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
Thanks, Peter.
But this approach seems a bit torturous and involves a lot of overhead.
Can't imagine performance would be too good.
I was looking for a simpler solution that some of you have used in a production environment.
|
|
|
|
|
BoscoBill wrote: this approach seems a bit torturous and involves a lot of overhead.
You don't have much choice.
Switch to VS .NET or VS 2005+ and it will be much easier, since you'll have
managed support built in to the C++ language.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Has anyone successfully used the Regasm approach in production?
That seems like it may be workable.
|
|
|
|
|
BoscoBill wrote: Has anyone successfully used the Regasm approach in production?
I have no idea. It's still a viable solution, especially if you're good with COM
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
I'm facing some problem in standard MFC application. In my application, I'm able to run only 3 insatnces of my application simultaneously.That is, i'm able to open only three login screens at the same time, but I dont want this limitaton. I'm currently working in Windows XP. However, when I ran my application in Windows NT, only 4 instances can ber run at a time. When I tried to open it fourth time in Windows XP, it gets crashed at the following line of code.
//winfrm.cpp
BOOL CFrameWnd::Create(LPCTSTR lpszClassName,
LPCTSTR lpszWindowName,
DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd,
LPCTSTR lpszMenuName,
DWORD dwExStyle,
CCreateContext* pContext)
{
HMENU hMenu = NULL;
if (lpszMenuName != NULL)
{
// load in a menu that will get destroyed when window gets destroyed
HINSTANCE hInst = AfxFindResourceHandle(lpszMenuName, RT_MENU);
if ((hMenu = ::LoadMenu(hInst, lpszMenuName)) == NULL)
{
TRACE(traceAppMsg, 0, "Warning: failed to load menu for CFrameWnd.\n");
PostNcDestroy(); // perhaps delete the C++ object
return FALSE;
}}
m_strTitle = lpszWindowName; // save title for later
if (!CreateEx(dwExStyle, lpszClassName, lpszWindowName, dwStyle,
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
pParentWnd->GetSafeHwnd(), hMenu, (LPVOID)pContext))
{
TRACE(traceAppMsg, 0, "Warning: failed to create CFrameWnd.\n");
if (hMenu != NULL)
DestroyMenu(hMenu);
return FALSE;
}
return TRUE;
}
Can anybody please advise on this?
Chirag Kalra
Chirag Kalra
|
|
|
|
|
Hi,
I am trying to use the WinAPI function MoveFileEx to move an entire folder, but can't get the formats of the paths correct. Are trailing backslashes required on either or both paths? Are *.* required? I think I have tried every conceivable combination. Can someone please tell me what I am doing wrong?
Thanks
|
|
|
|
|
I think it will be better if you stablish the path, and then you iterate with the individual file names.
The backslashes should be needed in the string,
CString szFile1 = "C:\\MyFolder\\MyFile1.ext"
CString szFile2 = "C:\\MyFolder\\MyFile2.ext"
...
And I mean:
CString szPath = "C:\\MyFolder\\";
use FindFirstFile (...)
while (FindNextFile (...) can be used)
Get the name and move the file
Greetings.
--------
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
|
|
|
|
|
plz help me to complation this code :
#include<iostream>
using namespace ::std;
class calculator
{
private :
int x , y ,z
public :
}
|
|
|
|
|
eerrikkaa wrote: }
There's your hint.
"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
|
|
|
|
|
|
There should be be semicolons as shown below:
class calculator
{
private:
int x, y, z;
public:
};
Steve
|
|
|
|
|
eerrikkaa wrote: #include
using namespace ::std;
class calculator
{
private :
int x , y ,z
public :
}
The answer will help you to compile the code., but nothing will run.
you have to include void main() in your program to see something running.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hey all,
I asked this question before, but (surprisingly) did'nt get any replies.
Let me rephrase it in a bit different way..
I want to implement a SMTP server in C++, but dont know where to start from.
I looked up in internet for any tutorials or any already existing SMTP server classes,
but couldnt find any of them. The only thing that I found were classes for SMTP
clients, i.e. for sending emails, but that is not what I need as you can see.
I would really appreciate any helpful comments regarding this matter.
Thanks.
|
|
|
|
|
Hello everyone,
I have a long array (char*) and I need to check which bit is the first bit whose value is 1.
I have two ways to implement,
1. Iterate each byte, then iterate each bit in each byte one by one;
2. Iterate each byte, and check whether the value of the byte itself is non-zero, if yes, then iterate each bit in the byte to find which bit is the first bit which is set to 1, or else skip this byte and continue to iterate next byte.
I think (2) is always faster, right? But I do not know why (2) is faster since it is just my personal estimation without any concrete basis analysis.
thanks in advance,
George
|
|
|
|