Skip to content

Commit 3aa72e1

Browse files
authored
Merge pull request #12 from qtc-de/dev
Prepare v1.3.2 Release
2 parents d21128a + a39e46e commit 3aa72e1

File tree

6 files changed

+39
-10
lines changed

6 files changed

+39
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88

9+
## v1.3.2 - November 21, 2025
10+
11+
### Changed
12+
13+
* Ask for elevation when started without admin
14+
15+
916
## v1.3.1 - May 13, 2025
1017

1118
### Changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[![](https://github.com/qtc-de/rpv/actions/workflows/build-examples.yml/badge.svg?branch=main)](https://github.com/qtc-de/rpv/actions/workflows/build-examples.yml)
77
[![](https://github.com/qtc-de/rpv/actions/workflows/build-examples.yml/badge.svg?branch=dev)](https://github.com/qtc-de/rpv/actions/workflows/build-examples.yml)
8-
[![](https://img.shields.io/badge/version-1.3.1-blue)](https://github.com/qtc-de/rpv/releases)
8+
[![](https://img.shields.io/badge/version-1.3.2-blue)](https://github.com/qtc-de/rpv/releases)
99
[![](https://img.shields.io/badge/programming%20language-v-blue)](https://vlang.io/)
1010
[![](https://img.shields.io/badge/license-GPL%20v3.0-blue)](https://github.com/qtc-de/rpv/blob/master/LICENSE)
1111
[![](https://img.shields.io/badge/docs-fa6b05)](https://qtc-de.github.io/rpv)

src/rpc.v

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,10 @@ pub fn (server_info RpcServerBasicInfo) get_rpc_auth_info_h(process_handle win.H
864864

865865
defer
866866
{
867-
free(p_buffer)
867+
unsafe
868+
{
869+
free(p_buffer)
870+
}
868871
}
869872

870873
mut dll_name := ''
@@ -936,7 +939,10 @@ pub fn (server_info RpcServerBasicInfo) get_rpc_endpoints_h(process_handle win.H
936939

937940
defer
938941
{
939-
free(p_buffer)
942+
unsafe
943+
{
944+
free(p_buffer)
945+
}
940946
}
941947

942948
for entry in p_table

src/rpv-init.v

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module rpv
22

3+
import os
34
import win
45
import utils
56
import internals { validate_rpc_version }
@@ -14,7 +15,19 @@ fn init()
1415

1516
win.adjust_privilege("SeDebugPrivilege", true) or
1617
{
17-
panic('Failure while enabling SeDebugPrivilege: ${err}')
18+
unsafe
19+
{
20+
executable := os.executable()
21+
result := usize(C.ShellExecuteA(nil, 'runas'.str, executable.str, ''.str, nil, 1))
22+
23+
if result <= 32
24+
{
25+
C.MessageBoxA(nil, 'rpv requires admin privileges to inspect RPC processes.'.str, 'rpv Initialization Error'.str, C.MB_ICONERROR)
26+
exit(1)
27+
}
28+
29+
exit(0);
30+
}
1831
}
1932

2033
if C.CoInitialize(unsafe { nil }) != C.S_OK

v.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Module
22
{
33
name: 'rpv'
44
author: 'Tobias Neitzel (@qtc_de)'
5-
version: '1.3.1'
5+
version: '1.3.2'
66
repo_url: 'https://github.com/qtc-de/rpv'
77
vcs: 'git'
88
tags: ['rpc', 'rpv', 'rpv-web', 'rpcview']

win/interop.v

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -781,10 +781,12 @@ mut:
781781
bfOffBits DWORD
782782
}
783783

784-
// SYSTEM_INFO contains information on the currently operating system
784+
// RPV_SYSTEM_INFO contains information on the currently operating system
785785
// and the underlying hardware. rpv uses it, to obtain the process
786-
// architecture.
787-
pub struct SYSTEM_INFO
786+
// architecture. We cannot use the original C type C.SYSTEM_INFO here,
787+
// as it is defined already in the vlang stdlib, but with an incomplete
788+
// set of attributes
789+
pub struct RPV_SYSTEM_INFO
788790
{
789791
processor_architecture WORD
790792
reserved WORD
@@ -1807,7 +1809,7 @@ pub fn icon_to_bmp(icon HANDLE)! string
18071809
pub fn get_process_arch(process_handle HANDLE)! Arch
18081810
{
18091811
mut wow64 := false
1810-
system_info := SYSTEM_INFO{}
1812+
system_info := RPV_SYSTEM_INFO{}
18111813

18121814
C.GetNativeSystemInfo(&system_info)
18131815

@@ -1979,7 +1981,6 @@ fn C.GetLastError() DWORD
19791981
fn C.GetLogicalDrives() DWORD
19801982
fn C.GetMappedFileNameA(process_handle HANDLE, addr LPVOID, filename &char, size DWORD) DWORD
19811983
fn C.GetModuleFileNameExA(process_handle HANDLE, module_handle_array HANDLE, filename LPSTR, size DWORD) DWORD
1982-
fn C.GetNativeSystemInfo(system_info &SYSTEM_INFO)
19831984
fn C.GetObject(h HANDLE, c int, pv LPVOID) int
19841985
fn C.GetProcessId(process_handle HANDLE) DWORD
19851986
fn C.GetSystemDirectoryA(buffer LPSTR, size UINT) UINT
@@ -2017,3 +2018,5 @@ fn C.UuidToStringA(uuid &C.GUID, out_string &&char) int
20172018
fn C.VerQueryValueA(data voidptr, block &char, buffer voidptr, size &UINT) bool
20182019
fn C.VirtualQueryEx(process_handle HANDLE, address LPVOID, mem_info &C.MEMORY_BASIC_INFORMATION, length SIZE_T) bool
20192020
fn C.ZeroMemory(dest PVOID, length u32)
2021+
fn C.MessageBoxA(window_handle HANDLE, message &char, title &char, uType UINT)
2022+
fn C.ShellExecuteA(window_handle HANDLE, lpOperation &char, lpFile &char, lpParameters &char, lpDirectory &char, nShowCmd u32) HANDLE

0 commit comments

Comments
 (0)