|
No buddy i am working on win 2000
but i have not faced any problem of
such type .
But if ur dealing with sothing related
to hardware or so it can be . As far
as Dialog based app is concern its fine.
U might be missing some dll's
INDIA is GREAT
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Well, If an MFC based application hangs on win2000 there may be many reasons for that.
To name a few it might be an poorly designed code for.example. a while loop causing an infinite iteration eventually causing the hangup or an OS corrupted with virus etc..
I started coding in win2000 only and it very well supports Dilaog based applications.So Go ahead and have fun ....
JAI HIND
Rajeev
|
|
|
|
|
the application communicates with a usb device
every thing is ok on xp , but system hangs on win 2000 (not the application even ,need to restart the system)
I am an INDIAN
|
|
|
|
|
i does't mean win 2000 is not supporting dialog base application
i am looking for reasons for system hang at the startup of the application,
application is communication with usb device
application works at best in XP
Vandeeamatharam
(as 20 more days for republic day)
|
|
|
|
|
OK now there is the Bug
communication with the USB .
Actually the device driver frame work on which
the two operatign system reside are different &
so difference in programing of device driver
exist for 98,2000,XP
As u said do i use the HID class to communicate
with the USB
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
systems hangs up at start up of the application,
with out user request for any communication with usb device
i am using sdk,
what is HID class ?
Thnak u for ur Answer, pls help me out ...
|
|
|
|
|
Why peopel will get this type of problem
running on on xp,,,..system hang on 2000
wht can be the list of posibilites for these ?
|
|
|
|
|
ptr_Electron wrote: running on on xp,,,..system hang on 2000
Actually, when SD develop Software targetting different Windows OS, these type of problem generally appear, as new OS always contain some better class or dll then previous version..
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
I am getting problem like "fatal error C1083: Cannot open include file: 'psapi.h': No such file or directory". can u plz tell me how to get psapi.h file.
waiting 4 ur reply
|
|
|
|
|
It's part of the Platform SDK - available from the Microsoft website
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
|
If u get it then pls email me the
header and the dll file
as i cannot download the 300+MB of
SDK platform for those files
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
its better you install the SDK, you will then keep looking for other header fiels and other dll and libs.
-Prakash
|
|
|
|
|
Ok thanks prakash
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: as i cannot download the 300+MB of
SDK platform for those files
HI Vikas,
as you working for company, they must have MSDN subscription, there you can find cd containing copy od PSDK and other related Plateform Update
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi there, Iv wrote a program to transfer files between a cleint and a server,the code works fine for small files but not for large files,im going to post the code wich i hope will help other people trying to do something similar and in hope that i can get some suggestions on how to improve the code iv wrote.
{
char *buffer;
char sizebuf[20] = "";
long SizeOfFile = 1;
long BytesSent = 0;
std::ifstream file ("C:\\Windows\\Example.exe" std::ios::in | std::ios::binary | std::ios::ate);
if (!file)
{
MessageBox(NULL,"Error Opening File",NULL,MB_OK);
}
SizeOfFile = file.tellg(); //get size of file
file.seekg (0, std::ios::beg);
ltoa(SizeOfFile,sizebuf,10); //put sizeoffile in char buf
send(newsock,sizebuf,strlen(sizebuf),0);//send the size to client
buffer = new char[SizeOfFile];
file.read (buffer,SizeOfFile).eof();
do{
BytesSent = send(newsock,buffer,SizeOfFile,0);
}while(BytesSent < SizeOfFile);
Here i dont know if i should be reading blocks of the file into the buffer in the do while loop or out side of the loop and i dont know how to equally divide the file into "Chunks" to be sent separatly and rebuilt the other side help would be appriciated
{
char buffer[20];
long SizeOfFile = 0;
char* recvfilebuf;
recv(Socket,buffer,sizeof(buffer),0); //recv size of file to be d/l
SizeOfFile = atol(buffer);
ZeroMemory(buffer,20);
recvfileBuf = new char[SizeOfFile];
std::fstream file (C:\\Example.exe, std::ios::out | std::ios::binary | std::ios::ate); //Dir of our new .exe
if (!file)
{
MessageBox(NULL,"Error Opening File",MB_OK);
}
do
{
recieved = recv(Socket,recvfileBuf,SizeOfFile,0); //recv actuall file
file.write(recvfileBuf,recieved).eof(); //write new file
}while(recieved < SizeOfFile);
ZeroMemory(buffer,20);
}
I know there is a better way of doing what im trying to do but its hard without extensive know how on the subject..Any comments would be greatly apriciated
Thankyou
|
|
|
|
|
thes3cr3t1 wrote: the code works fine for small files but not for large files
Why not? What are you (not) seeing that is wrong?
thes3cr3t1 wrote: file.read (buffer,SizeOfFile).eof();
What is this?
thes3cr3t1 wrote: Here i dont know if i should be reading blocks of the file into the buffer in the do while loop...
Yes you should, unless you are reading all of the file at once.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
It looks like you typed this off the top of your head, because the example would not work as is.
The do while for recieving and writing data will probably go into an infinite loop, because recieved will probably never be greater than or equal to SizeOfFile . recv may only be reading the amount of data that is currently available (per documentation), that may be less than the whole file, so you need to read it in chunks and use a seperate variable to keep track of the total amount read.
Some thing like the following should work:
int written;
int recieved_so_far = 0;
do {
recieved = recv(...);
if( recieved == 0 ) {
continue;
}
else if( recieved < 0 ) {
}
recieved_so_far += recieved;
written = file.sputn(recfileBuf,recieved);
if( written != recieved )
} while( recieved_so_far < SizeOfFile );
Good luck!
INTP
Every thing is relative...
|
|
|
|
|
How can I prevent a dos box appearing on screen when I run a batch file? I want it to run invisibly in the background.
Same question for a .exe
Thanks
KevinSheedy
|
|
|
|
|
http://www.codeproject.com/win32/runsilent.asp[^]
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Hi!
I have some problems with this class. This class is implemented in a dll and it is called in own thread (GUIThread()). In GUIThread(): OleInitialize(NULL) is called, after main dll function (dllMain()) is called, and then dllMain() exits OleUninitialize() is called.
So:
- The 'this' pointer is not the same, for example, in OnInitDialog() and in a hmtl event-handling function, and I would like to refer to 'this' pointer, the application is aborted with a memory error.
- If GUIThread() is finished and I would like to run this thread again, the program aborted with a memory error, or some thread, which were started by MFC when CHtmlDialog class was used at first, isn't finished and there will be memory leaks.
Any ideas?
Balage
|
|
|
|
|
I want to print using the CView ,
when the Appliaction is open to view
the frame ,the size of font is fine
visible and in perfect size.
But when i give print preview the
size decreases , and also in print
the smae size is visible .
Can anyone give me some good link on
print and printpreview using the CScrollview
or CView.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
http://www.codeproject.com/printing/printingtricksandtips.asp
|
|
|
|
|
Thanks
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
How do you run a batch file or another executable using C/C++?
Thanks
KevinSheedy
|
|
|
|