X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: jbs30000 AT aol DOT com (Joel) Newsgroups: comp.os.msdos.djgpp Subject: Strange error message Date: 14 Apr 2004 08:26:29 -0700 Organization: http://groups.google.com Lines: 42 Message-ID: <84e4e2a9.0404140726.77691a0d@posting.google.com> NNTP-Posting-Host: 172.149.153.249 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1081956390 30115 127.0.0.1 (14 Apr 2004 15:26:30 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Wed, 14 Apr 2004 15:26:30 +0000 (UTC) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I'm trying to test an idea I have about writing an interrupt handler, but when I compiled the program as I was going along (to catch errors early) I got a strange error a couple of times. So I saw a demo program in one of the help files, so I copied and pasted it, just making a couple of changes like adding void to the function and commenting out do_stuff() since it's not a function, and adding #include and #include , tried compiling the test program, and go the same error. I wondered if my copy of djgpp was damaged, so I tried it on another copy I have on another drive, and still, same error. So it's my code that's the problem, since the sample code given gives the same error, and it's not a damaged copy of djgpp. So, I'll show the sample code, and the error, and hope that someone can tell me what's causing it. Thanks. #include #include _go32_dpmi_registers regs; void my_handler(_go32_dpmi_registers *r) { r->d.eax = 4; } void setup() { _go32_dpmi_seginfo info; _go32_dpmi_seginfo old_vector; _go32_dpmi_get_real_mode_interrupt_vector(0x84, &old_vector); info.pm_offset = my_handler; _go32_dpmi_allocate_real_mode_callback_iret(&info, ®s); _go32_dpmi_set_real_mode_interrupt_vector(0x84, &info); //do_stuff(); _go32_dpmi_set_real_mode_interrupt_vector(0x84, &old_vector); _go32_dpmi_free_real_mode_callback(&info); } The error refersed to the info.pm_offset = my_handler Error: error: invalid conversion from `void (*)(__dpmi_regs*)' to `long unsigned int' Also, in my program (not listed) I get the same error when I try to _go32_dpmi_lock_code a function of mine.