|
Rajesh R. Subramanian wrote: Microsoft Platform SDK is freely available from Microsoft
Rajesh R. Subramanian wrote: But on the other hand, MFC is set of classes (Not free),
I am totally confused by your above two statement! nothing is free buddy!
"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
|
|
|
|
|
ThatsAlok wrote: I am totally confused by your above two statement! nothing is free buddy!
You can freely download the Platform SDK from Microsoft, whereas you cannot do so with MFC. Is that what you are referring to?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: You can freely download the Platform SDK from Microsoft, whereas you cannot do so with MFC
Little OT question Sir, Is there is Some diffrence between Windows SDK and Plateform SDK?
"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
|
|
|
|
|
ThatsAlok wrote: Is there is Some diffrence between Windows SDK and Plateform SDK?
The Windows SDK is a subset of the Platform SDK.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
if the "winmain()" is visible, its an SDK program, if not it could be MFC.
SDK is programmed using C for calling APIs directly (though u can create your own classes in C++)
MFC is object oriented fully C++ based, wraps the raw API and gives you a faster way to create applications.
first learn SDK, then come to MFC. never land on MFC straight away. the mistake which i did Then you'd be asking "what the heck is windproc and whatz a winmain??!"
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
if the program have any dependancy to MFCxxx.dll, then the program uses MFC somewhere
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
if the project is done in MFC , it'll have MFC functions . if it is done in SDK , it will have SDK functions.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
snprani wrote: How to differentiate MFC functions and SDK and what are the differences between these two. Please help me in this regard.
Buddy, MFC is just a Object oriented Wrapper Over Windows SDK api.. which simplify working with apis easily.. thats a only major diffrence between them
"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
|
|
|
|
|
Read about MFC here.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I would like to know how to implement it in XP?
MOV AX, 6F09H ; Setting the Digital port is output
MOV BL, 09H ; Digital value is 09H
INT 15H
Can it be implement with inpout32.dll?
Please help!
|
|
|
|
|
The C compiler can handle inline assembly code, although I have never used this myself - maybe you could just use that?
Alternatively, a quick google tells me that INT 15H gives access to various BIOS calls, mostly related to memory maps etc., but after a 5-minute search I did not see INT 15 with those AX and BL values. So take a step back, and tell us what you are actually trying to do. What information are you looking for / what do you expect this call to do?
|
|
|
|
|
Thank you for answering my message!
In fact that it is the control of Digital I/O of an industical PC.
I need to use mfc to do it because it is only a part of my program.
Can you give me more hints to do it?
Please help!
|
|
|
|
|
My guess would be that there are 2 options - see if you can use the exact assembler code you list (MOV, MOV, INT), or else find out what the calls actually do, and try to repeat that functionality using C++.
This article http://www.codeproject.com/cpp/extasm.asp[^] has examples on how to include assembly statements into your code. There are restrictions on what you have privilege to do as a "normal" program (i.e. not part of the kernel) but I can not remember that stuff any more. If you want some ideas, look at http://www.codeproject.com/system/soviet_kernel_hack.asp[^] - I have no idea what that article means, though!!!
Trying to find out what the code actually does may be easier, as long as the system is not too old. What documentation do you have? The programmer's guide for the PC, which should be available if you are trying to use features which are specific to the PC, should have this information.
|
|
|
|
|
Thank you very much!
I found that it is using a chip set W83627HF.
Now I can use the "inpout32.dll" to set it.
Do you how to access it without using "inpout32.dll"?
I think it should have driver inside the Windows.
Please help!
|
|
|
|
|
To start off, download www.winbond.com/PDF/sheet/w83627hf.pdf[^], if you do not have it already.
This PDF document tells you for the Winbond chip what information is available at what port address, so you can use InpOut32.DLL to read information, or to write settings. For example, look at figure 2.1 on page 23.
But this still does not tell you how to replace the MOV, MOV, INT instructions. As far as I know, the MOV, MOV, INT instructions are motherboard BIOS functions - if you can find out what these actually do (maybe from motherboard documentation), maybe you can use the W83627 documentation and get the same effect by using INPOUT32 to write to or read from ports.
|
|
|
|
|
Now I can use the inpout32.dll to do the same effect.
But I would like to do it without using inpout32.dll.
Do you have any suggestion?
Please help!
|
|
|
|
|
Sorry - I used inpout32.dll when I wanted to do direct port I/O! I was quite happy with it.
Since you have not said what the BIOS call actually does, I can not guess how to implement it.
My suggestion would thus be to try to use inline assembler, and use the exact assembly instructions you gave in the original post.
You may have problems with privilege, in which case, search codeproject for PRIVILEGE, and see if you find anything useful.
|
|
|
|
|
The BIOS call is used to control the General I/O port of W83627HF chip set.
I just want to make my own driver instead of using inpout32.dll.
|
|
|
|
|
OK, seems a reasonable goal.
When I had to do port I/O under Windows NT / XP, I chose the easy route and used inpout32.dll. Others choose to do it the difficult way, but they learn more in the process!
Good luck.
|
|
|
|
|
Thank you very much!
I will try my best!
|
|
|
|
|
Hi,
For the first time I am posting a question.
Problem Context:I am writing a VC++ DLL in VC++ 6.0 . The dll is used in toll called Diadem. The dll is registered in this tool, so when the tool starts, it loads all registred dlls. then you can call any function defiened
in the dll. The function which I am calling creates link list(creates memory on heap), reads a text file, processes data and creates another text file. Thats all.
Problem Facing : When the control is suppose to return from the function written in dll, the main application(tool) goes into 'NOT RESPONDING' mode.
All functionality in the function written in dll is executed well, but while
returning it is giving error.
Regards,
Amol Ravatale
|
|
|
|
|
|
1)When i test the dll in debug mode(of VC++),it gives run-time error as follows:
Error type: ACCESS VIOLATION
Error address: 00001C42
Module name: COMMANDS.DLL (name of dll I am writting and calling from Diadem tool)
I am using FOR Loop for around 200 iterations and in that loop again one more FOR Loop for around 8000 iterations
2)another case is if function in dll is used without debug mode,
it does not give any error message and the application simply hangs.
For this 2nd case Kakan has already given solution to create thread and call
function from that one.
Regards,
Amol B. Ravatale
|
|
|
|
|
Hello.
You are a bit unclear of the problem, but I suspect it it like this:
When your program calls a function in the dll, then your program stops responding to events, right?
If that's the case, then the reason is that the called function (in the dll) takes a long time to execute, and during that time the program stops responding.
The you will need to create a thread. From that thread, call the function in the dll.
That way, your dialog will respond to Windows events.
Kakan
|
|
|
|
|
Kakan You are right, the function written in dll takes long time as there is for loop for 200 iterations, in this For Loop again one For Loop for around 8000 iterations.
Thank you very much....
for your kind help
Regards,
Amol
|
|
|
|