From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: calling functions Date: 16 Aug 2000 12:42:28 GMT Organization: Aachen University of Technology (RWTH) Lines: 18 Message-ID: <8ne27k$jde$1@nets3.rz.RWTH-Aachen.DE> References: <8ndkeb$lt8$5 AT info DOT cyf-kr DOT edu DOT pl> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: nets3.rz.RWTH-Aachen.DE 966429748 19886 137.226.32.75 (16 Aug 2000 12:42:28 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 16 Aug 2000 12:42:28 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Rafał Maj" wrote: > My small program is making a copy of code of some function. Program works > fine, until my function is trying to call > library functions. _Copy_ the code of a function? Why on earth would you want to do that? If that works, and be it only partly, it's by coincidence rather than by design. Even *reading* the actual code of some function isn't necessarily supported. Even less can you expect to be able to execute a mere char-array, like this. In a nutshell: function code isn't directly readable, and data isn't executable, in protected mode. Not in the way you do it, at least. You need some assembly, and you have to be extremely careful doing it. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.