Skip to content

Conversation

@yozhgoor
Copy link
Owner

@yozhgoor yozhgoor commented Feb 6, 2025

No description provided.

@yozhgoor yozhgoor marked this pull request as draft February 6, 2025 05:06
@yozhgoor yozhgoor marked this pull request as ready for review February 6, 2025 14:53
let process_creation_flags = PROCESS_CREATION_FLAGS(0);

// Convert command to a wide string with a null terminator.
let mut command_wide = command.encode_wide().chain(Some(0)).collect::<Vec<_>>();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this was 0 terminated string.

I think the 0 at the end is more correct.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah looks like there should be a NULL (0) at the end:

The maximum length of this string is 32,767 characters, including the Unicode terminating null character. If lpApplicationName is NULL, the module name portion of lpCommandLine is limited to MAX_PATH characters.

https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw

src/lib.rs Outdated
},
},

mod binding;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mod usually comes before all the use

@yozhgoor yozhgoor merged commit a84f552 into main Feb 6, 2025
1 check passed
@yozhgoor yozhgoor deleted the remove-windows branch February 6, 2025 16:41
yozhgoor added a commit that referenced this pull request Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants