Calling kernel.dll from Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg108399] Calling kernel.dll from Mathematica
- From: "Alexey Popkov" <lehin.p at gmail.com>
- Date: Tue, 16 Mar 2010 04:46:55 -0500 (EST)
Hello, There are nice examples in the Documentstion on calling simple functions defined in the Windows's kernel.dll from Mathematica. For example, it is easy to call GetTickCount function: Needs["NETLink`"] getTickCount = DefineDLLFunction["GetTickCount", "kernel32.dll", "int", {}] But I have not found any example on calling a function that returns a structure. I am interested in use GlobalMemoryStatusEx function that "retrieves information about the system's current usage of both physical and virtual memory." In C# it is easy to get this information in numerical form: http://msdn.microsoft.com/en-us/library/aa366589%28VS.85%29.aspx But how can this be done in Mathematica?