Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Vortex

Pages: [1] 2 3 ... 11
1
Tips & Tricks / Re: Terminate running process
« on: March 16, 2025, 04:42:20 AM »
Hi Quin,

Did you also try the 64-bit version? Probably, an insue related with my system as I compile and run the C++ equivalent of MrBcx's code without any problem.

2
User Contributions / Re: Windows SysLink Example
« on: March 14, 2025, 04:22:28 PM »
Hi Kevin,

Checking the box for BED's DPI /Manifest resource file worked, thanks.

3
User Contributions / Re: Windows SysLink Example
« on: March 14, 2025, 03:50:23 PM »
During an Ollydbg session to find where is the issue, the status of the stack before calling CreateWindowExA :

Code: [Select]
00E0FE70   00000000  |ExtStyle = 0
00E0FE74   00408014  |Class = "SysLink"
00E0FE78   0040CEFC  |WindowName = "Visit the BCX Basic website <A HREF="https://www.BcxBasicCoders.com">click here</A>"
00E0FE7C   56000000  |Style = WS_CHILD|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_VISIBLE
00E0FE80   00000014  |X = 14 (20.)
00E0FE84   00000014  |Y = 14 (20.)
00E0FE88   00000258  |Width = 258 (600.)
00E0FE8C   00000064  |Height = 64 (100.)
00E0FE90   000803F8  |hParent = 000803F8 ('Windows SysLink Demonstration',class='Windows SysLink Demonstration')
00E0FE94   0000270F  |hMenu = 0000270F
00E0FE98   00400000  |hInst = 00400000
00E0FE9C   00000000  \lParam = NULL

eax returns 0 after calling CreateWindowExA :

Code: [Select]
LastErr

ERROR_CANNOT_FIND_WND_CLASS (0000057F)

4
User Contributions / Re: Windows SysLink Example
« on: March 14, 2025, 03:11:34 PM »
Hi Kevin,

Thanks for the code. Testing the application on Windows 11 2024 H2, I get a blank window wihout hyperlink control. The title of the window is "Windows SysLink Demonstration"

Code built with BCX Version 8.2.5 and PellesC V12


5
Tips & Tricks / Re: Terminate running process
« on: March 14, 2025, 12:57:40 PM »

6
Tips & Tricks / Re: Terminate running process
« on: March 13, 2025, 03:21:04 PM »
Hi Kevin,

I tried your new example at work on a Windows 11 2024 H2 system and it worked without any issues. Thanks for your help, much appreciated.

7
Tips & Tricks / Re: Terminate running process
« on: March 12, 2025, 04:12:58 PM »
Hi Kevin,

Many thanks for your code. Testing the application on Windows 7 Sp1 64-bit, the 64-bit version of the application is crashing after displaying the report. No issue with the 32-bit version.

8
Tips & Tricks / Re: Terminate running process
« on: March 11, 2025, 04:24:43 PM »
Hi Kevin,

A script proposed by ChatGPT :

Code: [Select]
' VBScript to display command line of a specific process using Win32_Process class
Option Explicit

' Specify the process name here (e.g., "notepad.exe")
Dim processName
processName = "chrome.exe"

' Create WMI object to access system information
Dim objWMIService, colProcessList, objProcess
Dim strQuery

' Set the WMI query to get processes with the specified name
strQuery = "SELECT * FROM Win32_Process WHERE Name = '" & processName & "'"

' Connect to WMI service
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")

' Execute the query and get the collection of processes
Set colProcessList = objWMIService.ExecQuery(strQuery)

' Check if any processes were found
If colProcessList.Count = 0 Then
    WScript.Echo "No processes found with the name: " & processName
Else
    ' Loop through each process and display its command line
    For Each objProcess In colProcessList
        WScript.Echo "Process ID: " & objProcess.ProcessID
        WScript.Echo "Command Line: " & objProcess.CommandLine
        WScript.Echo "-------------------------"
    Next
End If

' Cleanup
Set objWMIService = Nothing
Set colProcessList = Nothing

Executing the script :

Code: [Select]
cscript cmdline.vbs

9
Tips & Tricks / Re: Terminate running process
« on: March 11, 2025, 02:08:01 PM »
Hi Kevin,

Trying this one :
Code: [Select]
Sql$ = "select CommandLine from win32_process where name=" + Cmd$

SET wmi = GetObject("winmgmts:")
SET result = wmi.ExecQuery(Sql$)

FOR EACH instance IN result
  PRINT instance
NEXT

Code: [Select]
D:\BCX\bed\test.c(1353): error #2051: Cast from 'OBJECT (aka struct _OBJECT)' to 'double' is invalid.
D:\BCX\bed\test.c(1353): error #2141: Type error in argument 2 to 'printf'; 'void' is invalid.

10
Tips & Tricks / Re: Terminate running process
« on: March 10, 2025, 04:12:40 PM »
Hi Kevin,

Sorry for asking, how to change your code to display the command line parameters of a specific process? The win32_process class is providing a property named CommandLine :

https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-process

Pseudo-code :

Code: [Select]
Sql$ = "select * from win32_process where name=" + Cmd$

SET wmi = GetObject("winmgmts:")
SET result = wmi.ExecQuery(Sql$)

FOR EACH instance IN result
  PRINT instance.CommandLine
NEXT
or
Code: [Select]
Sql$ = "select CommandLine from win32_process where name=" + Cmd$

SET wmi = GetObject("winmgmts:")
SET result = wmi.ExecQuery(Sql$)

FOR EACH instance IN result
  PRINT instance
NEXT

11
Wish List / Re: 64-bit VBS_ Functions
« on: March 10, 2025, 01:15:47 PM »
Hello,

TablacusScriptControl is a very nice project. Sadly, they are going to retire VBScript :

https://techcommunity.microsoft.com/blog/windows-itpro-blog/vbscript-deprecation-timelines-and-next-steps/4148301

I hope we can find a way to install TablacusScriptControl after this retirement.

12
Tips & Tricks / Re: Terminate running process
« on: March 09, 2025, 04:09:28 PM »
Hi nagrom,

I tested MrBcx's application on Window 7 Sp1 and it works without any issues. What's your operating system?

13
Tips & Tricks / Re: Terminate running process
« on: March 05, 2025, 11:31:33 AM »
Hello,

Thanks for your efforts. Another method to terminate a process is to use the Windows built-in command taskkill.

14
Wish List / Re: B64Encode$ and B64Decode$
« on: February 23, 2025, 03:48:28 AM »
Here is a quick example :

Code: [Select]
REM BCXSTRSIZE = 2048

DIM AS STRING BinData
DIM AS STRING MyStr, MyStr2
DIM AS DWORD binSize = BCXSTRSIZE
DIM AS DWORD MyStr2size = BCXSTRSIZE

MyStr = "This is a test."

CryptBinaryToString((CONST unsigned char*)MyStr, LEN (MyStr), _
CRYPT_STRING_BASE64, (char*)BinData, &binSize)

PRINT "String MyStr converted to base64 = ", BinData

CryptStringToBinary(BinData, 0, CRYPT_STRING_BASE64, (unsigned char *)&MyStr2, _
&MyStr2size, 0, 0)

PRINT "Base64 data BinData converted to string = ",MyStr2

The output :

Quote
String MyStr converted to base64 = VGhpcyBpcyBhIHRlc3Qu

Base64 data BinData converted to string = This is a test.

Pages: [1] 2 3 ... 11