|
|
Thanks in advance... I will try it !
But...does it work ?
Does anybody successfully use these 2 to hook HW interrupt ?
|
|
|
|
|
Here's some wonderful reading.
[Interrupt Service Routines]
[he WATCOM C/C++ Programmer's FAQ]
[finding a device on the PCI bus]
[PCI Device access under 32-Bit PM DOS]
there are 2 ways of finding a PCI device on the bus. You can either use the PCI BIOS interface call, or direct hardware I/O.
Here's the BIOS way:
INTEL_VENDOR_ID EQU 8086h ; intel's unique sig #
INTEL_EXP_NIC EQU 1227h ; sample PCI device etherexpress 10/100 NIC
.386
mov ax, 0b102h ; interrupt 1a function b102
mov dx, INTEL_VENDOR_ID
mov cx, INTEL_EXP_NIC
xor si, si ; 0=1st device, 1=2nd etc.
int 1ah
jc nope
; once returned from this call, BH=bus number, BL=device/function #
nope:
|
|
|
|
|
Thanks for your information first...
But what I want is to "replace" the ISR for specific HW interrupt in flat mode, not retrieving PCI device in protected mode !
|
|
|
|
|
How to spacify the width of a string in 'scanf_s' ?
I feel hard, since the width of the string in the input file is not fixed varying from 50 character to 120, so how to specify the buffer size.
I used 'scanf' to read input, I do not need to specify the length of the string.
Please advise.
Thanks
|
|
|
|
|
mrby123 wrote: How to spacify the width of a string in 'scanf_s' ?
Like this[^]...
mrby123 wrote: I feel hard, since the width of the string in the input file is not fixed varying from 50 character to 120, so how to specify the buffer size.
If the size varies, you have to specify the maximum size, the smaller string will fit just fine in the larger strings array.
mrby123 wrote: I used 'scanf' to read input, I do not need to specify the length of the string.
Yes, but this was a frequent cause of crashes due to buffer overflows, you don't HAVE to use scanf_s, if the previous version worked just fine for you, you can disable the warning with a pragma comment.
|
|
|
|
|
mrby123 wrote: I feel hard, since the width of the string in the input file is not fixed varying from 50 character to 120, so how to specify the buffer size.
You have to use a buffer at least equal to the maximum string length of the input file (hence at least 120 characters long) and specify the size of your buffer (that is 120 ) in the scanf_s call.
Veni, vidi, vici.
|
|
|
|
|
Hi,
i am stuck with a problem while working with Windows CE 5.0 on handheld device.I am using Embedded VC++(eVC++) with programming in C++(MFC).
i want to set the value "Never" to a Switch state to Suspend dropdown programmatically.
This dropdown is located in settings>>Power properties.
modified 24-Jul-12 1:19am.
|
|
|
|
|
I do not think you can modify system options in this way.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
okk...i am also trying to find some other way
bt while i was searching i found that i need to set ACSuspend value to 0 in registry
i found that from msdn link
http://msdn.microsoft.com/en-us/library/aa447563[^]
now i have to search how to programmatically edit the registry value(ie ACSuspend value)
btw thnx for your precious time....
if u find something instresting plz do keep me posted
|
|
|
|
|
You will need to use the Registry functions[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
yep....Cool
now i think my search ends here and coding starts
thnx once agn...
|
|
|
|
|
Hi,everyone,Can i use vc++6.0 with aforge(from aforgenet.com)? i see there are framework in aforget,so i am not sure if it is possible to use vc6.0 and aforge together?looking forwards to reply,thanks.
|
|
|
|
|
frank23231534 wrote: ,Can i use vc++6.0 with aforge Judging by the first sentence here[^] it would appear that you cannot. Can you upgrade to a later version that supports C++/CLI?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi All
I implemented a multi touch application. I follow MSDN tutorial using manipulation interface, here:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd371408(v=vs.85).aspx[^]
But I have many problems when panning or zooming, is not redrawing and glitches in scrren. I need to limit my CView and do panning when screen is bigger than CFrameWnd, because CFramewnd does not redraw. I don't know how to get frame size and limit CView to don't pass CFrameWnd size. I tried an anchor or dock window but did not work.
Please, I need any help.
Thank you.
|
|
|
|
|
Dansveen wrote: I don't know how to get frame size The GetClientRect() [^] and GetWindowRect() [^] functions may be what you need.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Ok
I'm using GetWindowRect like MSDN example. But I have problems when panning. I have a CView with same size as CFrameWnd, if I move the screen beyond origin the screen does not redraw. What I need is do a panning only if my CVIew is bigger than my parent frame, and don't if Cview is in origin. I tried getting screen limits but does not work.
Example:
________________ --->CFrameWnd - Glitches and does not redraw
| |
| ___________|____ ---> CView - out of screen origin
| | |
| | |
| | |
| | |
| | |
|__|_______________|
Thank you.
|
|
|
|
|
Dansveen wrote: I tried getting screen limits but does not work. I'm afraid that really does not tell us anything. Please show an extract of your code and try to explain exactly what results you are seeing and what you expect to happen.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hey, everyone! I want to use one of the Find() methods with a richtextbox(RichTextmethod.Find Method(String, RichTextBox)) and i'd like to no if i might use a textbox's text instead of the string used in this method. thanks
|
|
|
|
|
I already gave you a link to the RichTextBox documentation here[^]. Check the links for the various overloads of Find() and select the one you need.
byank wrote: <layer>if i might use a textbox's text instead of the string The text of a textbox is a string.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
the program should;-
create list
search for a certain element within the list
insert an element after and beginning
delete element after and at the beggining
|
|
|
|
|
If you are asking for a complete solution then you should read points 2 and 11 here[^]. If you just want suggestions about lists then try the standard library[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I think you meant here[^]
|
|
|
|
|
Those pesky meeces
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
phineas kimathi wrote: the program should;-
You should at least try doing your homework yourself.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|