|
This will not be easy. You need to download the DDK (device driver kit) for windows 98 and XP. In windows 98 you may be able to not use a device driver and can write a standard DOS ISR but with interrupt sharing (many devices can share the same hardware interrupt) you may run into problems. So you would have to write a VXD (device driver) for Win98 and a SYS for XP. There should be some documentation how to do this in the DDK for each of these.
John
|
|
|
|
|
LOOL, looks like u don't really know very much about that John!
ok Behzad, first you have to get the device driver kit from microsoft, it's free, only shipping has to be paid! (ddk is not free for download, u'll have to order it!)
-> you can find the online documentation of the ddk at http://msdn.microsoft.com[^] in section "Windows Development\Driver Development Kit".
-> ddk order here: http://www.microsoft.com/whdc/ddk/winddk.mspx[^]
i can only tell you, how this works on windows nt based systems, i dont like win98, so i dont code drivers 4 it
to connect to these interrupt events, use the IoConnectInterrupt API!
you will find more detailed infos here:
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=298&[^]
http://www.microsoft.com/mspress/books/sampchap/2507b.asp[^]
with source code:
http://www.beyondlogic.org/interrupts/winnt_isr_dpc.htm[^]
@john: coding device drivers is NOT DIFFICULT!
Don't try it, just do it!
|
|
|
|
|
Alexander M. wrote:
looks like u don't really know very much about that John!
No its not my are of interest, however I have created device drivers.
Alexander M. wrote:
first you have to get the device driver kit from microsoft, it's free, only shipping has to be paid! (ddk is not free for download, u'll have to order it!)
I downloaded all of the DDKs for free a few years back...
Alexander M. wrote:
@john: coding device drivers is NOT DIFFICULT!
I agree but It is not for the beginner programmer...
John
|
|
|
|
|
who called Behzad Ebrahimi a beginner?
Don't try it, just do it!
|
|
|
|
|
I get these kind of questions at least once a week and 90% of the time its way over their head. But since he did talk about an ISR he has some idea what he is talking about.
John
|
|
|
|
|
Hi, I am using a CHtmlView and I need to open a new window to the corresponding link when the new window option is chosen. I am able to make a new frame, I have put it on my CMultiDocTemplate (or something like that) and load the frame when the option is clicked. However, I don't know how to get the address of the link that was clicked on. How do I do that?
|
|
|
|
|
Hi, can ne1 help
if i had a string, mystring = "0933221212"
and i wanted to replace the first two characters "09"
with say "012" so i was left with "01233221212"
whats the best way of doing this
thanks loads
si
|
|
|
|
|
CString mystring = "0933221212";
mystring.Replace( "09", "012" );
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
thanks for the quick reply
the problem with what you sent me, is that it will replace
all occurrances of 09 with 012, i need it to replace only one
occurance of 09 which will always be the first two characters
thanks
si
|
|
|
|
|
CString mystring = "0933221212";
mystring.Replace( "09", "012" );
CString strRightPart = "012" + (mystring.Right(mystring.GetLenght()-2));
::AfxMessageBox(strRightPart);
I think it's something like this.
Best regards
Jens
|
|
|
|
|
if myString.Right(2)=="09"
{
myString.Delete(0, 2);
myString.Insert(0, "123");
}
MS
|
|
|
|
|
myString.TrimLeft(_T("09"));
myString.Insert(0, _T("123"));
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
If you want to replace the first two characters, then do this:
mystring = _T("012") + mystring.Mid(2); Hope this helps,
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"
|
|
|
|
|
hi I've just built an mfc program using visual c++ and when I run it on my pc (windows xp) is works perfectly...however, when it tried running it on another computer (running windows me)..it started giving a bunch of errors (kernell errors for example)...Can you PLEASE give me some ideas on what the problem can be..are there any incompatibilities between programming for xp and me..I know that i've not given enough information about my code but any help is welcomed
thanks
|
|
|
|
|
Did you just do a copy of the exe to the WinME computer? Because you will need to be sure the right MFC dlls are on the computer on which you run the MFC app.
-Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
It would help if you cut-and-paste the errors into your message.
The Number 1 reason something works in XP/NT/2000 and not on 95/98/ME is because the application is UNICODE and Windows 95/98/XP doesn't support UNICODE properly. To you compile your application for both 95/98/ME AND XP/NT/2000, choose the 'Win32 Release' build configuration not the 'Win32 Unicode Release' (or anything with Unicode in the title).
-Fistboy
|
|
|
|
|
hey guys,
i've seem to have one problem with 'InnoSetup' ( a program creating setups).
I've added to script that install has to make a desktop shortcut. After install, i open the shortcut. The program launches.
But then i get an error (error opening database file).
'Can not find c:\..\desktop\....db' file
The program searches in the directory where the shortcut is made!
It needs to search the database file in the same directory where the program executable really is (not where the shortcut is).
The same happens when i open the shortcut on start-menu. It searches the database files where the start menu group is located at.
The strange this is .. if i make a shortcut from my program to the desktop, i don't get this error and program is executed correctly.
Anyone who can fix this problem?
Greetings
Jens
|
|
|
|
|
I had exactly the same problem as you do. When the program runs from the start menu for some odd reason it thinks that the current running directory is the desktop (or the path the desktop ini file). To fix this problem you need to do the following:
LPTSTR szCmdLine;
szCmdLine = ::GetCommandLine();
CString strPath( szCmdLine );
int iCharPos = strPath.ReverseFind( '\\' );
strPath.SetAt( iCharPos, '\0' );
for( int j = 0; j < strPath.GetLength() - 1; j++ )
{
strPath.SetAt( j, strPath[j+1]);
}
if(!::SetCurrentDirectory( (LPCTSTR)strPath ) )
This problem is not innosetup related.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
AFAIK you have to set the working (start in) directory for the shortcut.
In the [Icons] section, set the directory in the WorkingDir entry. See your InnoSetup help files for more info.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
AFAIK you have to set the working (start in) directory for the shortcut.
In the [Icons] section, set the directory in the WorkingDir entry. See your InnoSetup help files for more info.
PJ Arends, it is not possible to set a working directory because the user can specify the directory himself.
Or am i misunderstanding?
<edit> I think this is a innosetup related problem because, if the user himself makes a shortcut to the program the program will be launched correctly
|
|
|
|
|
JensB wrote:
I think this is a innosetup related problem because, if the user himself makes a shortcut to the program the program will be launched correctly
I don't think that this problem relates to InnoSetup at all because I had to deal with this problem when I used InstallShield and Windows Installer.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
ah ok. I'll try that code out that you have provided me.
I'll let you know when it worked
|
|
|
|
|
YIHA
it works great!
Thanks alot Toni for helping out. :->)
|
|
|
|
|
JensB wrote:
Thanks alot Toni for helping out. :->)
You are welcome.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
JensB wrote:
PJ Arends, it is not possible to set a working directory because the user can specify the directory himself.
Or am i misunderstanding?
You are misunderstanding. You set it to {app} which is where the user selected the application to be installed.. See the documentation on that PJ suggested.
John
|
|
|
|