What to use on Vista x64

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator:Moderators

Post Reply
Neomex
Posts:4
Joined:Tue Jan 25, 2011 9:14 pm
What to use on Vista x64

Post by Neomex » Fri Jan 28, 2011 11:04 pm

Hello,
What can I use on Vista x64 instead partcopy (as I can't find old version, and the new one does not allow to write directly to floppy) and instead of debug.exe, which doesn't exist anymore?

Hoozim
Posts:34
Joined:Sun Nov 21, 2010 6:40 pm

Re: What to use on Vista x64

Post by Hoozim » Fri Jan 28, 2011 11:24 pm

Make your own application to do this with WIN32. That is what I did. It is really easy. Just simply open the device like a file ("\\\\.\\A:"). Then write to it.

Neomex
Posts:4
Joined:Tue Jan 25, 2011 9:14 pm

Re: What to use on Vista x64

Post by Neomex » Fri Jan 28, 2011 11:40 pm

Alright, thats bootloader, what about system files? just put it randomly?
Thanks a lot for reply.

Hoozim
Posts:34
Joined:Sun Nov 21, 2010 6:40 pm

Re: What to use on Vista x64

Post by Hoozim » Sat Jan 29, 2011 12:25 am

To put on all of the other files, just copy it like any other file. Then use a filesystem minidriver to find the file and load it.

Neomex
Posts:4
Joined:Tue Jan 25, 2011 9:14 pm

Re: What to use on Vista x64

Post by Neomex » Sat Jan 29, 2011 9:58 am

You sure it should look like this: "\\\\.\\A:" ?
For me it always returns error.

Code: Select all

#include <iostream>
#include <fstream>

using namespace std;
	
char a='k';

int main()
{
	fstream stream;
	stream.open( "\\\\.\\A:", ios::binary );

	if( stream.good() == false )
	{
		cout <<"Error";
	}

	for( int i = 0 ; i < 512 ; i++ )
	{
		stream >> a;
		//cout << a;
	}
	stream.close();
	cin.get();
	return 0;
}
A: device with floppy is present.

Hoozim
Posts:34
Joined:Sun Nov 21, 2010 6:40 pm

Re: What to use on Vista x64

Post by Hoozim » Sat Jan 29, 2011 4:40 pm

Remember that if Windows is using unicode, you need to use an L before the quotes (L"\\\\.\\A:").

I don't know if this works with fstreams. Include "Windows.h" and use the CreateFile function (with the FileExisting bit set). Then read and write with ReadFile() and WriteFile() functions. These functions are documented on the MSDN. Don't use IOSTREAM.

Post Reply