|
Device information as obtained from Jungo's WinDriver.
----------------------------------------------------------------------------------
1. Config. 1: interface no. 0 , alternate setting : 0
endpoints: 0 , class : 0x1 , subclass : 0x1 , protocol : 0x0
Pipe 00 , Control , direction : IN & OUT , packetsize : 8
2. Config. 1: interface no. 1 , alternate setting : 0
endpoints : 0 , class : 0x1 , subclass :0x2 , protocol :0x0
3. Config. 1: interface no. 1 , alternate setting : 1
endpoints : 1 , class : 0x1 , subclass :0x2 , protocol :0x0
1: endpoint address : 0x1,attributes : 0xd
max packet size : 8 (0x8) , Interval : 1
Pipe 01 , Isochronous , direction : OUT , packetsize : 8
4. Config. 1: interface no. 2 , alternate setting : 0
endpoints : 0 , class : 0x1 , subclass :0x2 , protocol :0x0
5. Config. 1: interface no. 2 , alternate setting : 1
endpoints : 1 , class : 0x1 , subclass :0x2 , protocol :0x0
1: endpoint address : 0x82,attributes : 0xd
max packet size : 8 (0x8) , Interval : 1
Pipe 82 , Isochronous , direction : IN , packetsize : 8
6. Config. 1: interface no. 3 , alternate setting : 0
endpoints : 1 , class : 0x3 , subclass :0x1 , protocol :0x1
1: endpoint address : 0x83,attributes : 0x3
max packet size : 8 (0x8) , Interval : 10
Pipe 83 , Interrupt , direction : IN , packetsize : 8
Windows XP Device Manager Detection
--------------------------------------------------------
KeyPad : Usb Human Interface Device
--------------------------------------------------------
hidclass.sys
hidhub.sys
hidparse.sys
hid.dll
Audio : Usb Audio Device
-----------------------------------------
drmk.sys
ks.sys
portcls.sys
stream.sys
USBAUDIO.sys
ksproxy.sys
kuser.dll
wdaud.drv
Usb Composite Device
-----------------------------------------
usbccgp.sys
They all use the Windows standard driver. No other driver are needed.
Requirements :
-------------------------
I have to send some Control Setup packets to a USB composite device on which i have to carry out the following operations.
1. Detect the On-hook / Off-hook status of a telephone.
2. Set a relay on the board On/Off.
3. Set a buzzer on the board On/Off.
Using WinDriver user interface I sent the following 8-byte Control Setup packets.
1. On-hook/Off-hook status:
--------------------------------------------
C.S packet : C0 00 00 00 00 00 01 00 [ C0 - specifies a vendor specific packet ]
[ 00 (second byte) - request type ]
[ 01 - size of the packet to be returned ]
Nt : The controller onboard the device detected the packet and sent a byte representing the status back ]
2. Set a Relay On/Off :
--------------------------------------------
C.S packet : C0 01 00 00 00 00 00 00 [ 01 - Put the Relay Off ]
C.S packet : C0 02 00 00 00 00 00 00 [ 02 - Put the Relay On ]
3. Set a buzzer On/Off :
--------------------------------------------
C.S packet : C0 03 00 00 00 00 00 00 [ 01 - Put the buzzer Off ]
C.S packet : C0 04 00 00 00 00 00 00 [ 02 - Put the buzzer On ]
I wrote a user application to enumerate the device using the SetupdiXxx functions from the Windows DDK. I succesfully got the device path and opened a handle to the device using CreateFile.
Question 1:
-------------------
Can i send vendor specific IOCTL's to the standard driver. I have come accross 2 files : usbioctl.h and usbuser.h in the WINDDK folder. In usbuser.h I have come accross USBUSER_OP_SEND_ONE_PACKET ioctl. Can i use this ioctl to send 8-byte Control Setup packets to the device. Will this work with the usbccgp.sys driver.
Question 2:
-------------------
If the above method does not work then i think that i will have to write a filter driver. Are there any problems with building filter driver for a windows standard driver. Also since i have a time restriction i want to know whether i can modify the filter driver boilerplate code given in windows ddk under .../src/wdm/usb/filter to handle these control packets.
|
|
|
|
|
We ran into problems writing keyboard filter drivers. It turned out you can not be sure which drivers will respond to which IOCTL, so at the very least, make your IOCTL configurable at runtime (read registry or something for your own non-default settings) since the user might install PC AnyWhere or have a Compaq system that uses up IOCTL points for 'standard' drivers.
Otherwise, at least for the keyboard, it was fairly straight forward (according to developer who wrote them - not me ).
|
|
|
|
|
I have a program that intercepts the WM_GETMINMAXINFO message for every window. The problem I am having is, when I am in the message queue, no widget resizing happens. For instance, when a window with scrollbars tries to maximize, the message is intercepted, and the correct new window size is set, but the scroll bars stay where they were before the maximization. I am calling the defwindowproc, and callwindowproc in my filter when needed, so that is not the problem. Note: the windowproc is called for all windows, not just windows attached to my program.
Please help!
Thanks
|
|
|
|
|
How are you intercepting the message? Are you using a CBT hook?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
yeah, i use a cbt hook to detect the minmax operation, then i do a setwindowlong to my function.
|
|
|
|
|
I am not 100% clear on what you are trying to do. Can you post the code of your CBTHook procedure, and then maybe I can better picture of what is going on.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
hey i finally got it figured out. thanks for trying to help.
if you still care, this is what i am doing:
i have a cbthook which installs a wndproc filter on any window which has a minmax event. the windowproc sets the ((MINMAXINFO *)lParam)->ptMaxTrackSize.y to a value that allows me to still see winamp down on the bottom of the screen (in windowshade mode) when the window is maximized.
once the WM_GETMINMAXINFO message has been sent twice (and that was the part I didn't get), my filter resets the windowproc to its original function.
|
|
|
|
|
Hello folks.
I have this application which holds in its MainFrame a splitter window with two views. One of these views is an instance of CHtmlView (I didn't derive a class). This view only displays some HTML.
My problem is that I want to print the HTML content, as I can do it with my IE6. I tried using the Print function, inherited from CWnd, but it happened nothing:
<br />
void CMainFrame::OnReportPrint()<br />
{<br />
int iRet = 0;<br />
CPrintDialog wndPrint(TRUE, PD_ALLPAGES | PD_USEDEVMODECOPIES | <br />
PD_NOPAGENUMS | PD_HIDEPRINTTOFILE | PD_NOSELECTION | <br />
PD_RETURNDC, m_pReportView);<br />
CDC* pPrintDC;<br />
<br />
iRet = wndPrint.DoModal();<br />
if (iRet == IDOK)<br />
{<br />
pPrintDC = CDC::FromHandle(wndPrint.GetPrinterDC());<br />
m_pReportView->Print(pPrintDC, PRF_CLIENT);<br />
}<br />
}<br />
The handles seems to be OK, and neither exceptions nor asserts are thrown.
When I click with the right button of the mouse on the CHtmlView, it displays me a popup menu -the same that will display your IE browser- and if I select the "Print" option, it prints the content quite well. However, I'd rather to have an option from my menu, as shown in the above code. By the way, variable m_pReportView is a pointer to the CHtmlView instance.
Any thoughts will be very much appreciated.
Regards,
KK.
When the pork tacos are over, you continue with the chicken tacos.
- Mexican popular proverbe.
|
|
|
|
|
Try CHTMLView::ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER)
"Live long and prosper." - Spock
|
|
|
|
|
How to create tables in CRichEditCtrl?
How to use structure PARAFORMAT2?
|
|
|
|
|
|
|
Did you even try coding anything yourself?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Yes
I programmed under Win98\2000+VC60sp5 with Richedit 2.0 class (RichEdit20A window class name). Use mask PFM_TABLE (dwMask field) and PFE_TABLEROW, PFE_TABLECELLEND, and PFE_TABLECELL effects (wEffect field).
It in anything has not resulted.
|
|
|
|
|
The standard rich edit control doesn't support tables. It stores the values in the PARAFORMAT2 structure, but doesn't use them.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I want to develop an app that will help me simulate the notes played by say a flute .
I want to develop a tool that will help a learner play with notes and adjust the tempo .
I was thinking of something like this :
Say there are 7 notes and these notes are recorded as .wav files .
I am not recreating the sound of the instrument , but am gonna be playing the recorded notes .
Now I need to ability to to play these notes programmatically ? Is there any API for this ?
|
|
|
|
|
|
|
HI
I am making a screen capturing project in visual c++. I am having problem in using the library files of WINCP. how should i implment the functions in my project. How should i start.
THANK U!!
I require ur help
|
|
|
|
|
sarmed wrote:
I am having problem in using the library files of WINCP.
I am not familar with this API. From whence does it come?
In any case, why not just use a few lines of MFC code, like:
HDC hDC = GetWindowDC(pWnd->GetSafeHwnd());
CDC dc;
dc.Attach(hDC);
CDC dcMem;
dcMem.CreateCompatibleDC(&dc);
CRect rc;
pWnd->GetWindowRect(&rc);
CSize sz(rc.Width(), rc.Height());
bm.CreateCompatibleBitmap(&dc, sz.cx, sz.cy);
CBitmap bm;
CBitmap *bmOld = dcMem.SelectObject(&bm);
dcMem.BitBlt(0, 0, sz.cx, sz.cy, &dc, 0, 0, SRCCOPY);
dcMem.SelectObject(bmOld);
bm.Detach();
ReleaseDC(dc.Detach());
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I have created a modal property sheet and on my second page of Modal PropertySheet I have created a modeless property sheet and whenever I perform some action on any control of modeless propertypages and goes directly out of the application,it gets halt, but if you have performed some action on modeless property pages and then make some changed to Modal property page and you go out of the application, this will work perfectly
is there anyone who can solve this problem
i will be thankfull to him or her
thanks
|
|
|
|
|
Modern programmers don't use nature and science laws for make programs. I am use. You may save your time.
http://Luckyware.tripod.com
Sorry, mail not reading.
|
|
|
|
|
I'm sorry for responding to this message, but...
WTF is this???
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
|
Luckyware wrote:
Sorry, mail not reading.
Never mind
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|