473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

absolute address


in delphi you can use Ptr to an absolute address, can i do this in vc++.
in dos, i can use a dos font. i assume that if i save the dos font to
disk, then edit it, i have a new font. any copyright issues. or michael
mediford 20 years wrote editfont which did exactly that for dos. i was
trying to do the same for win32. but anyways, i was trying to get
biosinfo from the computer using vc++; seems like every computer is
different, it would be easier to use a pointer to point to it.

Marc...

--
DosFreak
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jan 4 '08 #1
4 1382
DosFreak wrote:
in delphi you can use Ptr to an absolute address, can i do this in
vc++. in dos, i can use a dos font. i assume that if i save the dos
font to disk, then edit it, i have a new font. any copyright issues.
or michael mediford 20 years wrote editfont which did exactly that
for dos. i was trying to do the same for win32. but anyways, i was
trying to get biosinfo from the computer using vc++; seems like every
computer is different, it would be easier to use a pointer to point
to it.
There is no access to physical memory under Windows unless you write a
kernel device driver (and please, don't).

-cd
Jan 4 '08 #2
Are you trying to access memory in bios to get the font, or are you trying
to store a vriable at a particular memory location?

Steve

Jan 4 '08 #3
DosFreak wrote:
in delphi you can use Ptr to an absolute address, can i do this in vc++.
The Delphi Ptr function converts an integer to a pointer. In C/C++, all
you need is a cast:

void* p = reinterpret_cast<void*>(0xFFFF5);

As others have said, this only works in DOS. You'll get an access
violation if you try to execute this in Win32.

Also, you should never use an integer to store a pointer, because that's
not going to work on x64, where int is 32-bit and void* is 64-bit. A lot
of Delphi code uses integers for HDC and HANDLE variables. There will be
major portability issues with those programs.

And finally, if you plan to distribute your product, you shouldn't steal
the font from the BIOS. There are plenty of monospace fonts out there,
and some of them were designed to look like a DOS terminal.

Tom
Jan 7 '08 #4
I have used copies of monospaced fonts read out of bioses in portable
equipment, but I have always ended up modifying the font at least a little
bit.
Nowadays I just write a font edit program and draw the font I want.
It ends up just being an array definition that contains all of the bytes
from the font.

If you want a font that is exactly the same as a bios font, but don't want
to actually use the bios font, then you will have to write your own font
draw functions anyway. I do that, but only in embedded stuff where I don't
have access to font systems that meet my needs.

Steve
Jan 8 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Stuart | last post by:
Hi All, I got a challenge to make the same APS/Script/Html run on different web roots. I can not use relative pathing in a lot of cases. We use lots of included files so depending on where that...
15
by: Nick K. | last post by:
I recently began maintenance work on a production web server that is located in the root directory of a web server. I moved this into a sub web on my local web server in order to do work on it. I...
4
by: mike eli | last post by:
Hi, I have several absolute positioned elements inside an absolute positioned DIV. I would like one of the nested elements to have a dynamic width. I set it's left and right attributes to 5, so...
3
by: Pooja Renukdas | last post by:
Hello, I have this web site where only two pages have to be secure pages and I need to call them using https, but since I have my development server and my production web server, I dont want to...
4
by: Amir Eshterayeh | last post by:
Dear Friends My asp hyperlink goes to relative address instead of absolute. I like navigate url goes to outsite link like www.asp.net but now, it goes to www.mysite/www.asp.net please help....
1
by: Don | last post by:
Environment: VB6 under W98 I have to use a DLL which has a single entry point expressed as an absolute address. Any function to be invoked is then specified as one of the arguments. The number...
9
by: volcano | last post by:
Can it be done, and if yes - how?
6
by: Jon Slaughter | last post by:
do I have to prefix every absolute path with document root to get it to work? For some reason I thought that prefixing a path with '/' or './' with make it absolute w.r.t to document root but I...
20
by: mehstg1319 | last post by:
Hi there Not sure if anyone can help me, I am working on a site for my university, and am having a bit of trouble with css positioning. I am very new to css and do not know very much about it....
14
by: Yep | last post by:
Hi Guys, I have some confusion with pointers and implicitly specifying a size of memory to write. I will try to explain what I am trying to do a bit better. char *myaddress=(char *)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.