#6 Windows.h and windows data types

Closed
opened 3 years ago by scuti · 4 comments
scuti commented 3 years ago

More complex portions of code use windows.h and defined data types from there. For reference to create a generic version,

https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx

A header file of analogous defines and functions can be made- if needed.

More complex portions of code use windows.h and defined data types from there. For reference to create a generic version, https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx A header file of analogous defines and functions can be made- if needed.
suhrke commented 3 years ago
Collaborator

GlobalAlloc, GlobalLock, GlobalUnlock, GlobalFree used for simplifying synchronization between program and printer/scanner. Since we’re eliminating direct printer and scanner operation, as well as the GUI, we can safely use generic memory management functions instead.

GlobalAlloc, GlobalLock, GlobalUnlock, GlobalFree used for simplifying synchronization between program and printer/scanner. Since we're eliminating direct printer and scanner operation, as well as the GUI, we can safely use generic memory management functions instead.
suhrke commented 3 years ago
Collaborator

Semi-related: long and pointer are 64-bit values in *NIX and only 32 bits in Windows. In paperbak.h, preprocessor errors if structs t_data and t_superdata are not 128 bytes. If memory alignment is required in the sections we are porting, we have an issue.

Edit: Other sections of the code do read a file into a buffer and then set a struct pointer to the beginnig of that buffer so it is very possible that a different alignment of a struct could break things in difficult to find ways.

Semi-related: long and pointer are 64-bit values in *NIX and only 32 bits in Windows. In paperbak.h, preprocessor errors if structs t_data and t_superdata are not 128 bytes. If memory alignment is required in the sections we are porting, we have an issue. Edit: Other sections of the code do read a file into a buffer and then set a struct pointer to the beginnig of that buffer so it is very possible that a different alignment of a struct could break things in difficult to find ways.
suhrke commented 3 years ago
Collaborator

Windows bitmap includes are structs and have been replaced by an equivalent in Linux. I believe bitmap construction is already in Printer but we can easily write our own, if necessary.

Windows bitmap includes are structs and have been replaced by an equivalent in Linux. I believe bitmap construction is already in Printer but we can easily write our own, if necessary.
scuti commented 3 years ago
Owner
https://git.teknik.io/scuti/paperback-cli/commit/cb39f3e2d9a534066a7ab6b48a5e8ca213d7275f
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.