Kernel32 (Windows __stdcall
)¤
Wrapper around the 32-bit Windows __stdcall
library, kernel32.dll.
Example of a server that loads a 32-bit Windows library, kernel32.dll, in a 32-bit Python interpreter to host the library. The corresponding Kernel64 class is created in a 64-bit Python interpreter and the Kernel64 class sends requests to the Kernel32 class which calls the 32-bit library to execute the request and then returns the response from the library.
Note
This example is only valid on Windows.
Kernel32 ¤
Kernel32(host, port)
Bases: Server32
Wrapper around the 32-bit Windows __stdcall
library.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
host
|
str
|
The IP address (or hostname) to use for the server. |
required |
port
|
int
|
The port to open for the server. |
required |
Source code in src/msl/examples/loadlib/kernel32.py
27 28 29 30 31 32 33 34 35 36 |
|
get_local_time ¤
get_local_time()
Calls the kernel32.GetLocalTime function to get the current date and time.
See the corresponding Kernel64.get_local_time method.
Returns:
Type | Description |
---|---|
datetime
|
The current date and time. |
Source code in src/msl/examples/loadlib/kernel32.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|