Skip to main content

azathoth_core/os/windows/inet/
structs.rs

1#![allow(non_snake_case, non_camel_case_types)]
2
3use core::ffi::c_int;
4use crate::os::windows::types::{DWORD, LPSTR, USHORT};
5
6/// Components of a parsed URL string, used with `InternetCrackUrlA`.
7#[repr(C)]
8#[derive(Debug)]
9pub struct URL_COMPONENTSA {
10    /// Size of this structure, in bytes.
11    pub dwStructSize: DWORD,
12    /// Pointer to a buffer that receives the URL scheme (e.g., "http").
13    pub lpszScheme: LPSTR,
14    /// Length of the scheme string, in characters.
15    pub dwSchemeLength: DWORD,
16    /// Scheme type value as determined by the API.
17    pub nScheme: c_int,
18    /// Pointer to a buffer that receives the host name.
19    pub lpszHostName: LPSTR,
20    /// Length of the host name string, in characters.
21    pub dwHostNameLength: DWORD,
22    /// Port number extracted from the URL.
23    pub nPort: USHORT,
24    /// Pointer to a buffer that receives the username, if present.
25    pub lpszUserName: LPSTR,
26    /// Length of the username string, in characters.
27    pub dwUserNameLength: DWORD,
28    /// Pointer to a buffer that receives the password, if present.
29    pub lpszPassword: LPSTR,
30    /// Length of the password string, in characters.
31    pub dwPasswordLength: DWORD,
32    /// Pointer to a buffer that receives the URL path.
33    pub lpszUrlPath: LPSTR,
34    /// Length of the URL path string, in characters.
35    pub dwUrlPathLength: DWORD,
36    /// Pointer to a buffer that receives extra info or query parameters.
37    pub lpszExtraInfo: LPSTR,
38    /// Length of the extra info string, in characters.
39    pub dwExtraInfoLength: DWORD,
40}