|
While trying to convert an old Pascal program into Visual Studio 6.0 C++ WIn32. The hardware interfaces (for the device) quotes the base address is I/O port 300 (hex) for I/O port commands.
How do you access this address in a C++ Win32 application.
Cheers,
Andy
|
|
|
|
|
The bad news: You can't access the hardware in Win32. At least not in a user program. A driver does have permission to access hardware.
The good news: There are some free drivers to get.
The one I have heard about the most is inpout32.dll. Can be donwloaded from http://www.logix4u.net.[^]
There is others too, such as userport (Google for it).
I haven't tried them myself, so I can't answer questions about them.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
|
No kidding: Open VC++ and press "F1". You'll get a complete help, and an index in which you can search for specific terms.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
(Having deleted his own message)
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Um, Wimp ?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
James R. Twine wrote: Um, Wimp?
Uhm - yes.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Hi,
I created a desktop in winsta0 windowstation. but i am unable to start explorer shell in that.or i do not be able to start a notepad in the desktop.
can anyone tell me why i cant?
any idea is appreciated.
Thanks
~ Selva
|
|
|
|
|
Just a thought - when you try to start the executables, what do the error/return codes tell you? GetLastError() can tell you a lot in situations like this...
Are you sure you are passing the correct ACCESS_MASK bit values?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks for your reply james.
I have given all the access while creating the desktop..
application error occurs while starting explorer.
Getlasterror returns nothing ...
seems application error happens after starting the explorer....
and to note i am doing all these things from a service...
any idea?
Thanks
-- modified at 7:56 Thursday 21st December, 2006
~ Selva
|
|
|
|
|
Again, what error codes are being returned?
Does the service have the "Allow Service to interact with the Desktop" setting set?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks again,
Getlasterror doesnt return any errorcode..actually the createprocess method succeeds(returns true)...but i havent set 'Allow Service to interact with the Desktop' right..How can i set it programmatically...
Is there any API to do this...and FYI, i am creating a custom desktop in winsta0 windowstation....
mine one is a simple service application where i donot create any user account to run my service (oops!!! i dont know to do that actually).
i think we can use ntrights to give the rights. but for whom should i give the right..can i directly give the service name to set the right..
pls correct me if i am wrong..
~ Selva
|
|
|
|
|
I m using c:\winnt\explorer.exe as the command line parameter..
and i am calling the createprocess function immediately after the createdesktop function..do i have to set any environments??
thanks
~ Selva
|
|
|
|
|
You should use GetWindowsDirectory(...) to get the location of the Windows directory on the target system.
You should not have to manually set up any environment variables unless other applications you are using specifically depend on them.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
ChangeServiceConfig(...) can be used to turn that setting (SERVICE_INTERACTIVE_PROCESS ) on and off.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks James...Let me try them out...
Peace
~ Selva
|
|
|
|
|
Hi Shiv here,
I am in developement of a toolbar for IE7.0 vista. Toolbar works
very fine with protected mode off. But once I turn it on, I found that
it does not even respond to WM_COMMAND, then all other is total invain.
The low integrity and all other questions can come when it will try to access any file or anything. But here it does not even respond to clicks
or hits. please anyone can help me atleast to get the problem other than this.
Regards
Shiv
|| ART OF LIVING ||
|
|
|
|
|
Hi shivditya,
I have a question I think you can help me I want to learning programming for IE(Toolbar) and I searching on the codeproject and find lot of articles about it,but I have a problem with all of them I cant compile their when I want to compling each of them I am getting many errors
that I didnt understand do you know an article that I can learn and it compile without error for example I get this error on the an article
error C2787: 'IInputObject' : no GUID has been associated with this object
Thank you
|
|
|
|
|
.NET comes up with predefined macros like __FUNCTION__ which can be handy while retrieving the function signatures in a program. Is there a way to get the same functionality in lower versions of VC++?
|
|
|
|
|
Copy and paste the macro definitions from .NET to your older project?
|
|
|
|
|
__FUNCTION__ is a special #define created for you by the compiler. Unless the compiler provides it, there's no way for you to code it, unless you do the following at the start of each function:
void API::Function1()
#undef __FUNCTION__
#define __FUNCTION__ API::Function1
{
}
void API::Function2()
#undef __FUNCTION__
#define __FUNCTION__ API::Function2
{
}
void API::Function3()
#undef __FUNCTION__
#define __FUNCTION__ API::Function3
{
} which would get really, really old, really, really fast.
Software Zen: delete this;
|
|
|
|
|
I dont understand what do you need do you want to learning VC++ ?
|
|
|
|
|
Hi,
How can I get the last part ("1") of the file name using strstr or something else ???
char dtSrt[BUF_SIZE] = "C:\\Test\\6.20.1.txt"
char *pdest;
pdest = strstr(dtSrt,"");
Thnx again
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Searching a bit longer proves to be a good option for me ....
char dtSrt[BUF_SIZE] = "C:\\Test\\6.20.1.txt"
char *pdest;
pdest = strrchr(dtSrt,'.');
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|