Jump to content
Excelsior Forums


  • Content count

  • Joined

  • Last visited


Community Reputation

0 Neutral

About ulises31

  • Rank
  • Birthday 01/01/01
  1. calling dll functions

    Hello. I DID IT!!!!!! :D :D In the end it works.I followed the next steps: 1-make an import library whit all functions and structures that i need from dll library in a lib file whit xlib tool. 2-create a def file whit definition of all functions and built sym file. 3-voila!!!!it works.Now i can import functions I'm thinking make a lib and def file of all functions of psapi.dll,but later 'cose i have an exercise first week in september and must study. I have other problem now .Any can explain me what means OPEN ARRAY OF CHAR and how use it(little piece code example if is posible please)I try use GetModuleFileName function.THANKS.
  2. calling dll functions

    Well lets write english O.K. I did this: <* +M2EXTENSIONS *> <* +USEDLL*> <* +IMPLIB*> MODULE test; IMPORT Windows; VAR BEGIN Windows.EnumProcesses(); END test. Compiler Answer: Error in test.mod[11:10]:undeclared identifier "EnumProcesses" [quote See the sample in XDS\samples\Generic, would you please? It uses a lot of Windows APIs. The module Windows is in XDS\def\Win32. I saw that sample, and i found all windows api functions that uses in win32 def files. I think that you are wrong,i not found neither of the functions that are in psapi.dll library in win32 def files in \def\win32 folder. Tnx
  3. calling dll functions

    srry,user32.def no,windows.def
  4. calling dll functions

    ???Well,is posible that i not explain well.Problems? :-/ First of all,my native language is spanish,no english.I don`t want make my own dll.I know that don't need load user32.dll cuz there is a def called user32.def(only was an example).I only want call to a function of a dll from my program passing needed parameters an taken return values from that function.There is not a def file called psapi.def, and i want call EnumProcesses function and take return values.If how do this is in any place in the guide,tell me where exactly.I did this: VAR hmod: dllRTS.HMOD; init: PROC; . . . hmod := dllRTS.LoadModule("psapi.DLL"); init := dllRTS.GetProcAdr(hmod, "EnumProcesses"); init; This function(EnumProcesses) returns a pointer to the processes runing in the pc, but i can get that pointer. I read that guide again,again and over again and find nothing about how call to a function of the o.s. dll passing parameters and geting return values. . Resuming:I ONLY WANT MAKE A PROGRAM THAT CALL THE FUNCTION EnumProcesses IN TO PSAPI.DLL AND USE THE VALUES THAT THE FUNCTION RETURNS.
  5. calling dll functions

    First,THANKS .Well, i loaded dll module and get adress of a function whitin it.Now i don`t now how get the parameters that the function returns when i call it. i.e.:I load user32.dll module and get adress of GetActiveWindow function.This function returns a window handle.How can i get it? . Tnx
  6. calling dll functions

    Hello again Is there any way in modula-2 to call a function within windows dll library(kernel32,ole32,winsock,psapi,etc.) Tnx.
  7. xds win32 lib info

    Hello again.Srry about GetModuleHandle procedure.I was wrong.I tried locate a module that was not mapped into the address space of the calling process. and with this procedure is not posible(i think).Is there any way to enumerate all processes that are currently runing in the system? Tnx again
  8. xds win32 lib info

    Hello.First of all, doc about XDS win32 libs is patetic. I am trying programming win32 using xds win32 libraries,but i can't find doc about it(no examples,no comments,nothing).Any know where can i find doc about it(ref about procedures,examples,etc)?.i.e.:I am trying use GetModuleHandle procedure from windows.def.I write the next code: MODULE modulo; <* +M2EXTENSIONS *> IMPORT SWholeIO,STextIO,Windows,Storage,SYSTEM,Strings; TYPE name=ARRAY [0..7] OF CHAR; TYPE pf =POINTER TO name; VAR handler:Windows.HMODULE; pointer:pf; BEGIN Storage.ALLOCATE(pointer,SIZE(name)); pointer^:="xds.exe"; handler:=Windows.GetModuleHandle(pointer); IF handler<>NIL THEN STextIO.WriteString( " o.k."); ELSE STextIO.WriteString(" shit"); END; END modulo. pointer always return NIL.IF i put NIL instead xds.exe,it works fine.I am runing under Windows XP.Under Windows Me same.What am i doing wrong?.I try to use DlgProc procedure and same.Is posible get an reference guide of win32 xds libraries?Tnx