Date: Fri, 21 Feb 1997 15:53:34 -0300 Message-Id: <1.5.4.16.19970221120727.3607b64c@dmeasc.rc.ipt.br> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: djgpp AT delorie DOT com From: Cesar Scarpini Rabak Subject: DPMI error in SVAsyncInit - SVAsync Library Trying to employ the SVAsync library in a project we got the "Error in locking memory !" message. This behaviour only manifests with CWSDPMI, in MS-DOS box under Win3.1 it doesn't occur. I've instrumented with __FILE__, __LINE__ macros the function in svasync.c that could be the cause and narrowed down the following code: static void lock_interrupt_memory(void) { int errval; __dpmi_meminfo info; unsigned long address; __dpmi_get_segment_base_address(_my_ds(), &address); . . . info.address = (int) address + (int) __djgpp_ds_alias; info.size = 2; errval = __dpmi_lock_linear_region(&info); <<<<<<<< if(errval == -1) printf("%s:%d DPMI Error %x in locking memory\n", __FILE__, __LINE__, __dpmi_error); } the chevron shows the call that's causing the error message. Also, the DPMI error returned does not help to much as it turned to be the value of the DPMI function itself (0x600). Reading the docs I've figured out that the handle member of the __dpmi_meminfo is not being initialized, but can't tell if this is important as the lock_interrupt_memory functions does a lot of similar operations w/o initializing it. Does anyone have any idea on what may be wrong? This behaviour is consistent in two different machines (one a 386DX40, other a 486DX66). As I've seen references to this lib here, I believe other are having good results with it. The version information on this lib taken from the svasync.c file is as follows: /* * SVAsync 0.10 * Copyright (c) 1996 Samuel Vincent, 7337 Carioca Ct, Rohnert Park, Ca 94928 */ TIA ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cesar Scarpini Rabak E-mail: csrabak AT ipt DOT br DME/ASC Phone: 55-11-268-3522 Ext.350 IPT - Instituto de Pesquisas Tecnologicas Fax: 55-11-268-5996 Av. Prof. Almeida Prado, 532. Sao Paulo - SP 05508-901 BRAZIL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~