|
How do u want to do it?Through a preogram or manually?
nave
|
|
|
|
|
Try this :
CString consoleData=ExecuteExternalFile("cmd.exe","Notepad");
I hope this will help
!OOPS----- See here for ExecuteExternalFile function
http://www.codeproject.com/cpp/9505Yamaha_1.asp[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 23:52 Thursday 20th July, 2006
|
|
|
|
|
|
Thanks buddy.
I just modified my post.
I was referring to the same article
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi! thanks a lot!
I still have a question.
could anyone please help me?
if i use the VC++ function as: system("dir");
,then how to do such that the CString variable "consoleData" has the MS-DOS text which contains the content as following
磁碟區 C 中的磁碟是 ROOT
磁碟區序號: 60FF-1491
C:\ 的目錄
2006/07/25 下午 03:29 18 1.bat
2006/07/19 上午 08:54 amc
2005/07/30 下午 10:07 0 AUTOEXEC.BAT
2005/07/30 下午 10:07 0 CONFIG.SYS
2006/04/17 上午 11:12 Documents and Settings
2006/04/17 下午 01:41 Inetpub
2006/04/21 下午 03:54 Keil
2005/10/20 下午 07:49 NETTERM
2006/07/25 下午 03:29 0 out.txt
2005/07/31 上午 12:05 PN300
2006/07/20 下午 12:34 Program Files
2006/04/21 下午 04:34 Sharpdesk Desktop
2006/03/02 上午 10:23 21 tmuninst.ini
2006/02/22 下午 11:57 27,262,976 VIRTPART.DAT
2006/07/25 上午 09:28 WINDOWS
6 個檔案 27,263,015 位元組
9 個目錄 11,136,081,920 位元組可用
ErixChang
|
|
|
|
|
When ever i compile my program this error is there how to come out of this....how to slove this error????
//BSCMAKE: error BK1506 : cannot open file '.\Debug\StdAfx.sbr': No such file or directory
After deleting debug folder still not working...error is there
-- modified at 23:33 Thursday 20th July, 2006
|
|
|
|
|
Delete the debug folder and try rebuilding...
nave
|
|
|
|
|
|
ok..Another way..Take project->Setting->C++ tab
in the category combo take "Precompiled Headers"
Now check the Radio button "Not using precompiled headers".
Then rebuild the preoject.
nave
|
|
|
|
|
I dont know what went wrong....now i got three error......After that
c:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : error C2146: syntax error : missing ';' before identifier 'KSPIN_LOCK'
c:\program files\microsoft visual studio\vc98\include\winnt.h(1092) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\StdAfx.sbr': No such file or directory
Error executing bscmake.exe.
|
|
|
|
|
hi
Try by adding #include <stdafx.h>
Hope this will help
|
|
|
|
|
|
Are you using VS2003 or vs2005??
#include <stdafx.h> should be in the first line of all include statements.
Just check this.
|
|
|
|
|
|
|
Try this...
Go to project settings-->Link
Change the debug directory name to something else like Debug1.
|
|
|
|
|
for (index=0; SetupDiEnumDeviceInterfaces(deviceInfo, 0, (LPGUID)&GUID_CLASS_USB, index, &DeviceInterfaceData); index++) {
memset(tempstr, 0, 1024);
deviceDetailData = (PSP_DEVICE_INTERFACE_DETAIL_DATA)tempstr;
deviceDetailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
SetupDiGetDeviceInterfaceDetail(deviceInfo, &DeviceInterfaceData, deviceDetailData, 1024, &requiredLength, NULL);
hUSBHandle = CreateFile(deviceDetailData->DevicePath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
CloseHandle(hUSBHandle);
}
I would like enumerate all usb devices and get their device address.
How could I do?
Thanks and regards
|
|
|
|
|
Hi guys,
I posted before but looks like that post is long gone. I also didnt describe the problem very well so here i will go at another attempt.
I am using DLL Injection to do a system-wide WriteProcessMemory Hook using Microsoft Detours. My hook works, because I get the desired change in the function but there is one problem that I do not understand why it is occuring. Everytime I initiate the hook, explorer.exe seems to crash. That is the only program that crashes and I do not know why. Would anyone know why it would crash?
I want to try a different method. Specifically on hooking the export. Would anyone know how I would do a hook on the WriteProcessMemory Export in kernel32?
Any help to my two questions would be appreciated. I'll post some code if you need it.
Thanks,
Robbie
|
|
|
|
|
hey all,
I do a checksum logic on both the serial device and the Pc end to see if the correct packet is received.
I do :
<br />
for (i = 0 ; i < (nMaxLenPkt2Tx - 1); i++)<br />
{ cChkSum_2pc ^= txbuffer[i];}<br />
<br />
txbuffer[i] = cChkSum_2pc;
and then send the packet from the serial device to PC.
and on Pc's end, I do this after receiving the packet before copying it to a local buffer.
char cChkSum = 0;<br />
<code>for (i = 0 ; i < (PKTINFO_LEN_MPU_2PC - 1); i++)<br />
<br />
cChkSum ^= m_cBufPktInfo_mpu_2pc[i];
and compare this checksum count with teh received checksu count in the packet to determine if it is a correct packet or not. ie.,
if (cChkSum != m_cBufPktInfo_mpu_2pc[PKTINFO_LEN_MPU_2PC - 1])<br />
{<br />
TRACE("Received a bad packet!\n");<br />
}<br />
But I get badpacket everytime . Waht could be wrong? the datatypes and the length of the packet sent and received are the same. I have checked that.
Any ideas/help?
Thanks in advance.
|
|
|
|
|
|
Ok so here is the situation,
I had an assignment due in my class(Don't Worry it is over now, however I had to turn it in incomplete) I want to finish it up for the learning experience my class is a 100 level class at my college and it is programming in C++.
Here is the link: Assignment BIGINT
Now I have finished some of it and commented most of it so hopefully it will be easy to understand where I am.
Class Definition:Class Definition
Class Inplementation:Implemenation
The main point of this assigment was operator overloading and I need to get +, -, *, / ++, --, +=, -=, ==, !, >, < overloaded.
Now I know that this is a large amount of work, however I was hoping we could work at this one step at a time and I would appreciate this an extreme amount. Thanks Alot Guys
-Duncan
|
|
|
|
|
ask for a specific question first, and only then, you'll get some help. if people feel you ask them to do the job for you, no one will come.
then, the first problem is ...?
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Ok Well to be specific I have been working on it the last two days, I really need help with
* & / I am sure that if I get these I will have no problem with the rest of it.
ALSO I have updated the class and class implementation with what I finished last night. Added material includes:
Constructors all complete.
+=(Although it uses + operator)
-=(Also uses - operater)
==, !=, <, >
and negative -(unary -)
Check the Links Thanks Again Guys
|
|
|
|
|
I have all the function define now need to call function with parameter????
So i need to create an instance of an 'CArielAPI' object.????HOW????
-- modified at 22:01 Thursday 20th July, 2006
|
|
|
|
|
How long have you been writing code for ? This is a very confusing question, because the answer seems to be so simple. Assuming that CArielAPI is a class, you need to include the header it was defined in so it's visible where you want to create it, then you just plain declare it.
Perhaps you need to explain some more ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|