Click here to Skip to main content
15,921,295 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHMENU handle of a popup menu Pin
15-Mar-04 0:13
suss15-Mar-04 0:13 
GeneralRe: HMENU handle of a popup menu Pin
Steve S15-Mar-04 0:39
Steve S15-Mar-04 0:39 
GeneralRe: HMENU handle of a popup menu Pin
15-Mar-04 2:21
suss15-Mar-04 2:21 
GeneralRe: HMENU handle of a popup menu Pin
Ravi Bhavnani15-Mar-04 4:00
professionalRavi Bhavnani15-Mar-04 4:00 
GeneralRe: HMENU handle of a popup menu Pin
not-logged-in15-Mar-04 4:54
sussnot-logged-in15-Mar-04 4:54 
GeneralRe: HMENU handle of a popup menu Pin
Ravi Bhavnani15-Mar-04 6:50
professionalRavi Bhavnani15-Mar-04 6:50 
GeneralOutlook Automation Pin
Amir Leshem14-Mar-04 23:45
Amir Leshem14-Mar-04 23:45 
GeneralThread Problem Pin
Caoimh14-Mar-04 22:50
Caoimh14-Mar-04 22:50 
Hi,

I've a global variable char*tptr. The routines for writing and reading are shown below. The problem is that when I want to write some value example tptr= "HELLO"; The response to "HELLO" is "MORNING" however tptr only returns "MORNI" from the ThreadEzusbRead function and then followed by some memory errors messages.

Any suggestions much appreciated
Kind Regards
Caoimh


void ThreadEzusbWrite(HANDLE hDeviceWrite)
{

unsigned long nbyte;
BOOLEAN bResult = FALSE;

BULK_TRANSFER_CONTROL bulkControl;
bulkControl.pipeNum = 0;
DWORD IOCTL = IOCTL_EZUSB_BULK_WRITE;

bResult = DeviceIoControl( hDeviceWrite,
IOCTL,
&bulkControl,
sizeof(BULK_TRANSFER_CONTROL),
tptr,
30,
&nbyte,
NULL );

if(WriteEvent)
SetEvent(WriteEvent);
}


void ThreadEzusbRead(HANDLE hDeviceRead)
{
unsigned long nbyte;
BOOLEAN bResult = FALSE;

BULK_TRANSFER_CONTROL bulkControl;
bulkControl.pipeNum = 2;

DWORD IOCTL = IOCTL_EZUSB_BULK_READ;

bResult = DeviceIoControl( hDeviceRead,
IOCTL,
&bulkControl,
sizeof(BULK_TRANSFER_CONTROL),
tptr,
30,
&nbyte,
NULL );

if(ReadEvent)
SetEvent(ReadEvent);
}
GeneralRe: Thread Problem Pin
Caoimh15-Mar-04 7:05
Caoimh15-Mar-04 7:05 
GeneralRe: Thread Problem Pin
Nitron15-Mar-04 15:26
Nitron15-Mar-04 15:26 
GeneralRe: Thread Problem Pin
Caoimh16-Mar-04 0:04
Caoimh16-Mar-04 0:04 
GeneralIncluding library to Visual C++ Pin
JeabJB14-Mar-04 22:45
JeabJB14-Mar-04 22:45 
GeneralRe: Including library to Visual C++ Pin
Prakash Nadar14-Mar-04 23:22
Prakash Nadar14-Mar-04 23:22 
GeneralRe: Including library to Visual C++ Pin
Steve S15-Mar-04 0:41
Steve S15-Mar-04 0:41 
GeneralGetting access to OE inbox Pin
ravjak14-Mar-04 22:09
ravjak14-Mar-04 22:09 
GeneralRe: Getting access to OE inbox Pin
Joel Lucsy15-Mar-04 5:18
Joel Lucsy15-Mar-04 5:18 
GeneralRe: Getting access to OE inbox Pin
ravjak15-Mar-04 10:46
ravjak15-Mar-04 10:46 
GeneralFilter Driver for File Operations Pin
mmica14-Mar-04 21:51
mmica14-Mar-04 21:51 
GeneralRe: Filter Driver for File Operations Pin
Ravi Bhavnani15-Mar-04 4:06
professionalRavi Bhavnani15-Mar-04 4:06 
GeneralDialogBox Pin
asv14-Mar-04 21:25
asv14-Mar-04 21:25 
GeneralRe: DialogBox Pin
Prakash Nadar14-Mar-04 21:36
Prakash Nadar14-Mar-04 21:36 
GeneralTinting a Bitmap Pin
MeterMan14-Mar-04 20:30
MeterMan14-Mar-04 20:30 
GeneralRe: Tinting a Bitmap Pin
Monty214-Mar-04 20:37
Monty214-Mar-04 20:37 
GeneralRe: Tinting a Bitmap Pin
MeterMan14-Mar-04 20:42
MeterMan14-Mar-04 20:42 
GeneralRe: Tinting a Bitmap Pin
Monty214-Mar-04 20:56
Monty214-Mar-04 20:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.