www.digitalmars.com         C & C++   DMDScript  

c++.dos.32-bits - where are dpmi functions defined?

reply tomekM <tomekM_member pathlink.com> writes:
I was trying to use one of the function defined in dpmi.h header. So I wrote
that program:

#include <stdio.h>
#include <dpmi.h>

MemInfo_t mi;

void main()
{
if(dpmi_IsRealMode()) printf("Real mode\n");
else printf("non Real mode\n");

dpmi_GetFreeMemInfo(&mi);
printf("%lu\n", mi.LargestContiguousBlock);

}

but linker says:

D:\tmp>dmc -o sample1.exe -mx sample.c x32v.lib
link cx+sample,sample1,,x32v/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

sample.obj(sample)
Error 42: Symbol Undefined _dpmi_GetFreeMemInfo
sample.obj(sample)
Error 42: Symbol Undefined _dpmi_IsRealMode

--- errorlevel 2

I did a search in lib subdirectory of dmc compiler and not found any *.lib
containing those undefined functions. So, what additionaly I should link to my
program?

Thanks in advance,
tomekM
Nov 10 2004
next sibling parent reply "Walter" <newshound digitalmars.com> writes:
Did you get the files from www.dosextender.com?
Nov 10 2004
parent tomekM <tomekM_member pathlink.com> writes:
In article <cmuev8$pph$1 digitaldaemon.com>, Walter says...
Did you get the files from www.dosextender.com?
Yes, I did. I took x32.zip file from ftp://ftp.dosextender.com/x32.zip tomekM
Nov 12 2004
prev sibling parent "Walter" <newshound digitalmars.com> writes:
Those functions are only available under 16 bit Windows. Sorry.

"tomekM" <tomekM_member pathlink.com> wrote in message
news:cmt4ss$1tsb$1 digitaldaemon.com...
 I was trying to use one of the function defined in dpmi.h header. So I
wrote
 that program:

 #include <stdio.h>
 #include <dpmi.h>

 MemInfo_t mi;

 void main()
 {
 if(dpmi_IsRealMode()) printf("Real mode\n");
 else printf("non Real mode\n");

 dpmi_GetFreeMemInfo(&mi);
 printf("%lu\n", mi.LargestContiguousBlock);

 }

 but linker says:

 D:\tmp>dmc -o sample1.exe -mx sample.c x32v.lib
 link cx+sample,sample1,,x32v/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 sample.obj(sample)
 Error 42: Symbol Undefined _dpmi_GetFreeMemInfo
 sample.obj(sample)
 Error 42: Symbol Undefined _dpmi_IsRealMode

 --- errorlevel 2

 I did a search in lib subdirectory of dmc compiler and not found any *.lib
 containing those undefined functions. So, what additionaly I should link
to my
 program?

 Thanks in advance,
 tomekM
Nov 13 2004