|
KarstenK wrote: did you read about the members of the CString class. Reading the doc is fundamental to get a programmer.
everything is written in MSDN, then why are you lurking here?, dear be polite to new programmer, remember you urself have started as beginner some day. "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
It's possible that he was never a beginer. Maybe he is a genius, started out as a top-notch programmer. Take a look at the articles he wrote, and you will get the idea.
|
|
|
|
|
Have you tried AfxExtractSubString() ?
You could also do something like:
char s1[4], s2[4], s3[4], s4[4];
sscanf("10.7.50.18", "%[^.].%[^.].%[^.].%[^.]", s1, s2, s3, s4); "One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi
I'm looking to write a virtual disk in C/C++/Pascal,
that'll work just like a regular FAT32 partition
that is a part of a PC's hard drive.
1. Programming background:
- I've had a bit of C/C++ programming experience,
but my Pascal skills are better.
- I'm not exactly familiar with Assembly language,
but if some Assembly code were to find its way
into a C/C++/Pascal wrapped function, using a
technique called 'inline Assembly' (I think) and
all parameters and/or function results were to be
passed in or returned in the hosting high level
language, that'll work
2. Wishes:
- As far as I understand, the control application
would probably have to be written as a TSR,
which means that it should take the least amount
of RAM possible; this would be useful if the user
would want to boot their PC with a BootCD, then
make a RAMdrive on the extended RAM, then perhaps
start (or create) one or more virtual disks within
that RAMdrive
- It'll have to be either already formatted, or
formattable with DOS's format.com, to either
FAT16 or FAT32, so long DOS can recognize it
- It'll have to have a drive letter assigned to
it, such as D: or E: where it's preferable for
either the user or via code to be able to
select a drive letter on demand; multiple disk
volumes should be loadable one after another,
on the same DOS session
- It should be able to create a new volume upon
request, and the user should be able to set
its size (or capacity)
- It should be loadable via AUTOEXEC.BAT or just
the command line prompt, and not via CONFIG.SYS
- It should work under either pure MSDOS mode or
in a DOS box under Windows 98/XP
- Option : it should be partitionable
- Option : it should be resizable (up to a point)
if size of total files in it is near
capacity
So - any ideas on how to make DOS virtual disks?
Thanks in advance
LL
|
|
|
|
|
Well that's six questions, largely on the same subject, but I'm not exactly sure what you are asking. I suggest some research first into the subject you are interested in, and then come back with specifics.
[edit]sorry, seven questions![/edit]txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hi
Believe me, my friend, I've done some serious research
on the subject. Unfortunatley I do not have enough
programming knowledge to write a control application
myself, nor a direction as where to look for, regarding
some code samples (or complete applications) from which
I could learn.
That's why, of course, I thought I'd post my questions
online, with a sincere hope that more experienced and
knowledgeable programmers would be willing to help out.
There are a few questions, alright, but I think it's
better to ask them all at once and thus shed some
light on the subject from all (or most) possible angles,
I mean, isn't that what a good programmer's supposed
to do?
If my questions have been unclear to you in any way,
please be specific as to what it is exactly you'd like
to know and I'll be happy to clarify.
Regards
LL
|
|
|
|
|
Seems to me like you are re-inveting the wheel here.
If my virtual you mean VirtulPC/VMWare disk then there are a number of tools available.
e.g. Using vhdmount with virtualpc[^]
Personally I have been using tools like the above for years now without any problem. Windows 7 even has the feature built in.Alan
|
|
|
|
|
Yeah,
I know VPC - a very nice program
But I really want to do this without
having to use an enormous support
system such as Windows - instead I want
to keep things simple.
Much like the idea of LiveCD for Linux,
you know what I mean?
Huh, there's a thought... Perhaps you
would know if Linux would have a VDisk
application with open source - not that
I would know anything about compiling
things under Linux, of course
LL
|
|
|
|
|
These type of programs would be tough even for a seasoned developer, let alone someone of your caliber. I don't offer that to be mean, just honest. For example, when I see folks claim "I know C/C++" or some form thereof, that's a big clue that all they've really done is write C code with a C++ compiler. Yes, there are exceptions, but those exceptions are easily identified.
Writing device drivers, disk formatters and defragmenters, and virtual disks are not trivial tasks (see here). I suggest starting with something a little less ambitious and work your way up to more advanced topics.
Lastly, given the amount of response that would be required, did you really think that your questions could be answered in this forum? Ask specific questions, and you'll get lots more help.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Honesty is good, Sir.
I understand this would be quite a task
However, I'd like to start somewhere,
then take it from there... For example,
(if we were to get specific) the first
major things I would like to know are:
1. How to I assign a drive letter (such
as D: or E to a file?
2. How do I get all normal (or basic)
disk I/O into that file?
- For example, let's say that somehow
I got E: assigned to a file called
disk.000 - what if, on the command
prompt, I were to write something
like:
copy C:\ntldr E:\
- I would need to have DOS think
that E: is like any other partition.
Thanks
LL
|
|
|
|
|
Low_Level wrote: . How to I assign a drive letter (such
as D: or E to a file?
Drive letters are a function of the operating system which is why Linux does not use them.
Low_Level wrote: 2. How do I get all normal (or basic)
disk I/O into that file?
If you want to use DOS then you are going to have to get old school and use a TSR to deal with Int13.
As has already been said you really are making a rod for your own back here. If you want something like a Linux LiveCD then use that. If you want to use Windows based applications in the same way then look at BartPE[^] or the WAIK[^]
Sorry chap I really cannot think of a way to help you further.
Alan
|
|
|
|
|
Hi Alan,
Well, one thing to say - that's more than I knew before
1. Regarding Linux LiveCD, I wouldn't mind using that
if I knew it could read/write FAT32 files. That'll do.
2. IF not, then nctionalitymy idea was to somehow duplicate the
functionality (to SOME extent) of either:
a. Old DOS Vdisk.SYS - I think it had to do with making
some sort of compressed drives, didn't it?
b. Norton Ghost's Virtual Partition thing - I'm not quite
familiar with that but it was my impression that Ghost
is able to create some sort of a virtual partition in
order to back up to or restore from.
3. Bottom line is this: what specific info should I be looking
for, in order to find out about:
a. The specific DOS service (interrupt?) to use
in order to assign drive letter + an example,
if possible
b. Disk I/O redirection; an example here would also,
of course, be appreciated.
Thanks in advance
LL
|
|
|
|
|
Ok let me try and deal with things in order.
1. Yes, although I am no expert in Linux, every LiveCD I have used supports Fat32.
2. a. Well that is going back a bit. The problem I see with DOS is device support. My own experience of running DOS on newer hardware is simply the complete lack of support for the newer data busses. Now add to that you will be running a 16bit single CPU OS on 64bit multicore hardware... you follow me here?
2. b. Hmmm... not familiar with that one.
3. a. INT13 is a call to the system BIOS (hence my earlier mention of hardware support). Again something I am not best placed to commend on. You should look at FreeDOS[^]
3. b. See above although I will come back to this.
Again what you are trying to do has been done before. I use the Windows AIK pretty much most days for my work as it provides me with the ability to mount virtual disks (now available in Windows 7 as part of the OS).
If you want to create your own Windows based virtual disk then you should examine the Windows Driver kit (specifically the Installable File System Driver samples).
Good luck
Alan
|
|
|
|
|
Hi
1. Regarding Linux / LiveCD:
a. Would you know if it is possible, using - I guess - any Linux
that's already installed on my PC - to make my own LiveCD?
b. I've heard there's a Linux system called 'tmpfs' that may
be suitable to my needs - would you have any ideas?
c. Could you refer me to links where I would find
C/C++ compilers for Linux, that:
- are free?
- are optionally open-source?
- Work preferably off a LiveCD - or a hard drive-based Linux?
- Can generate standalone executables, meaning program files
that can run off LiveCD without any need for DLL or runtime?
Quite frankly, if making a DOS virtual disk application
may prove too nerve wrecking, Linux might be the answer
Even though I don't know much about Linux
Anyhow, I'll be waiting for your other tips
Thanks much
LL
|
|
|
|
|
Hi
I'm having difficulties compiling PGPDisk 6.02,
possibly because I'm not quite sure as to how to
set up all extra libraries/tools.
1. The PC's specs I was using to compile were:
- Pentium 4 w/2gb RAM
- WinXP Pro w/s.p.2
- MS Visual C++ 6 Ent
- Win98 DDK
2. The things I wasn't sure about were:
- For Win98 DDK:
+ this wasn't available from Microsoft anymore, I had to look for
it elsewhere online - how do I know if I found the right version?
- For other DDK versions:
+ would anyone know where to find Server 2003 or whatever other versions
being referred to in the compilation documentation? Because as the case
seems to be, the only remaining SDK or DDK available online is the
new WinDDK 7; question is, would that DDK be useful, and if so,
how to I get this one to compile - instead of all others required?
- For Windows Driver Kit 7.0.0:
+ would this have been the replacement / only driver SDK available
for all Win versions from now on? In other words, what if I want
to use PGPDisk on a Win98 machine - do I still have to compile
it on an NT based system?
Any ideas on how to fix the above?
Thanks in advance
LL
|
|
|
|
|
Hi
I'm looking to write a boot manager in C/C++/Pascal,
much like Powerquest's PQBoot in the sense of the user's
being able to select a partition to boot from, then
(the application would) modify the MBR (I think) and
then the PC would reboot to the selected partition.
1. Programming background:
- I've had a bit of C/C++ programming experience,
but my Pascal skills are better.
- I'm not exactly familiar with Assembly language,
but if some Assembly code were to find its way
into a C/C++/Pascal wrapped function, using a
technique called 'inline Assembly' (I think) and
all parameters and/or function results were to be
passed in or returned in the hosting high level
language, that'll work
2. Wishes:
- I'd like for that utility to be able to work from:
+ MSDOS mode
+ Win98, WinXP (or later)
+ BootCD, where the user may select whether to boot
either from the CD or from the hard drive, assuming
there's a bootable primary partition there of course
- For any Win version or if run from a BootCD, my utility
would have to:
+ be able to run from within Win98, WinXP or later:
++ display all bootable partitions on PC's hard drive
++ reboot the PC to selected partition
+ be able to run from a BootCD:
++ allow user to select to continue booting from BootCD,
and if so, continue boot sequence off CD
++ allow user to select a bootable partition from hard drive
and if so, boot the PC to selected hard drive partition
3. Questions:
- Does it matter if the partition to boot from is
formatted on FAT16/FAT32/NTFS, or EXT2/3 f/Linux?
- Would I benefit from looking at code such as GAG
ot GRUB, or would there be any other, at least
somewhat high level (in terms of programming
language) types of source codes out there?
- Would I need some sort of an ISO image editor
or source code, in order to make an ISO for
a BootCD? If anyone should know of any freewares,
that'd be nice
So - any ideas on how to accomplish the above?
Thanks in advance
LL
|
|
|
|
|
Hi
I'm having difficulties compiling FreeDOS Scandisk,
possibly because I'm not quite sure as to how to
set up all extra include/library references.
1. The PC's specs I was using to compile were:
- Borland Turbo C++ 3
- Under Options/Directories menu command,
both 'include' and 'library' (if I recall
correctly those text field names) were
pointing to their actual on disk equivalents
2. The things I wasn't sure about were:
- There were about zillion error messages
regarding missing files;
- There were other error messages regarding
all sorts of variables names throughout
the code that the compiler claimed they
were undeclared.
Any ideas on how to fix the above?
Thanks in advance
LL
|
|
|
|
|
Hi
I'm having difficulties compiling FreeDOS Defrag,
possibly because I'm not quite sure as to how to
set up all extra include/library references.
1. The PC's specs I was using to compile were:
- Borland Turbo C++ 3
- Under Options/Directories menu command,
both 'include' and 'library' (if I recall
correctly those text field names) were
pointing to their actual on disk equivalents
2. The things I wasn't sure about were:
- There were about zillion error messages
regarding missing files;
- There were other error messages regarding
all sorts of variables names throughout
the code that the compiler claimed they
were undeclared.
Any ideas on how to fix the above?
Thanks in advance
LL
|
|
|
|
|
Hi
I'm looking to write a partition cloning utility,
much like Norton Ghost in the sense of being able
to copy only the USED sectors from one partition
to another.
I'd like for that utility to be able to work
mostly with FAT32 formats, even though NTFS
and/or EXT2 or EXT3 (f/Linux) would be nice too
1. Programming background:
- I've had a bit of C/C++ programming experience,
but my Pascal skills are better.
- I'm not exactly familiar with Assembly language,
but if some Assembly code were to find its way
into a C/C++/Pascal wrapped function, using a
technique called 'inline Assembly' (I think) and
all parameters and/or function results were to be
passed in or returned in the hosting high level
language, that'll work
2. Problems:
- how do I read a hard drive's FAT, in order to find out
which sectors are used and which ones aren't?
+ My idea for my utility is to be able to tell that, right
upon startup - much like what Microsoft's MSDOS Scandisk
does when it's ready to do its surface scan - where
there's a nice form (or window) appearing on screen,
and a whole bunch of differently colored columns are
in it, representing the examined disk's data layout.
+ Obviously it has to be done very quickly; I know I
could scan sector by sector, but the downside is
that it may take forever if there's a large partition
that is mostly empty.
- Another problem is an option that I'd like to add in,
which would have to do with displaying, and perhaps
catalogging all filenames and pathnames that get
read along the way, during a clone. If I were to refer
to Norton Ghost again, then it has a command line switch
allowing the user to generate some sort of a filename list.
3. Available source codes:
- I've checked out FreeDOS Defrag and Scandisk,
where both utilities were written in C or C++
plus another Scandisk version written in Turbo Pascal.
- Unfortunately, the two C/C++ utilities didn't even compile;
The Pascal version, however, did.
- I booted the PC via some BootCD with Win98 system files
and attempted to run FreeDOS Scandisk on pure MSDOS mode,
but, unfortunately it would report my either FAT32 partitions
as non-DOS disks.
Any ideas on how clone USED sectors only?
Thanks in advance
LL
|
|
|
|
|
Is it your college project or you want to hire someone to write yoru code "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
No Sir,
No college project, nor do I want to hire anyone
This is something I wanted to see if I can write on my own
and then add in some functions that I'd like to have.
Any ideas?
Cheers
LL
|
|
|
|
|
Hi,
I 'd like to know what does the dll and lib files in OpenCv contains?
and how can i explore their codes?
i know that openCV is an open source library so, why it contains dlls and libs files?
is it considered closing the source code.
Thank you
Ahmed******************
******************
** Ahmed Ismail **
******************
******************
|
|
|
|
|
Willow Garage is the offical maintainer of OpenCV now. Here's[^] where you start to find documentation and source code. The source IS available. I'd suggest you buy the book and read it to get started on what the library contains. You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
I have the manual of openCV and i have some sort of experience with it.
but i am talking about some lib and files we include it in the VC++ directories.
i gonna run C++ code based on openCV on NOISE|| mirceoprocessor.
so, i need to recompile these lib and dll files.
I hope my point is clear now. Ahmed Ismail
|
|
|
|
|
I'm not familiar with that processor. I work with OpenCV 2.0 and have done my own projects for VC++ 9.0 to build static libraries under Windows. Basically, if you look at the subdirectories under src, there are 5. CV, CVAux, CXCore, HighGUI, and ML. I built a lib using the source files from each folder. You'll have to set up your build environment to point to the correct lib files. In 2.0, this is just include\OpenCV, however, they did change the directory structure in 2.0 from earlier versions.
If you want to build DLLs, you'll have to set up a similar plan but with the output being the DLLs and link libraries. There are some #define statements that need to be set properly to properly export the functions and classes.
You may have better luck getting support in the OpenCV Group on Yahoo Groups rather than here.
What operating system are you running?You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|