is there an include file and library for safe string functions, like strsafe.lib, somewhere? I don't see this in my MASM32 library
Thanks
aBitLater
strsafe.h and strsafe.lib are the components of PSDK. I guess this is why the Masm32 package does not include them. ( More precisely, strsafe.lib is a MS static library.)
abitlater,
Here is an include file I started. I never got to the 'Character Count' functions.
; 'Safe String' Functions
;
; 'strsafe.h' and 'strsafe.lib' are in the Platform SDK
;
; All functions are STDCALL except
; StringCbPrintfA due to :VARARG
;
; Greg Lyon - March 2005
;
;
; 'Byte Count' Functions
;
; Tested and working
;
StringCbCatA PROTO :PTR BYTE, :DWORD, :PTR BYTE
StringCbCat EQU <StringCbCatA>
StringCbCopyA PROTO :PTR BYTE, :DWORD, :PTR BYTE
StringCbCopy EQU <StringCbCopyA>
StringCbLengthA PROTO :PTR BYTE, :DWORD, :DWORD
StringCbLength EQU <StringCbLengthA>
StringCbPrintfA PROTO C :PTR BYTE, :DWORD, :PTR BYTE, :VARARG
StringCbPrintf EQU <StringCbPrintfA>
; Not tested
;
;StringCbCatNA PROTO :PTR BYTE, :DWORD, :PTR BYTE, :DWORD
;StringCbCatN EQU <StringCbCatNA>
;
;StringCopyNA PROTO :PTR BYTE, :DWORD, :PTR BYTE, :DWORD
;StringCbCopyN EQU <StringCopyNA>
;
;StringCbVPrintfA PROTO :PTR BYTE, :DWORD, :PTR BYTE, :PTR BYTE
;StringCbVPrintf EQU <StringCbVPrintfA>
Hello,
All you need is here
http://www.masm32.com/board/index.php?topic=8022.msg59040#msg59040
Quote from: ToutEnMasm on January 08, 2008, 01:52:53 PM
Hello,
All you need is here
http://www.masm32.com/board/index.php?topic=8022.msg59040#msg59040
many thanks!
Cannot compile a strsafe example with function such as StringCbCopyA:
______snip_________
.586
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\msvcrt.inc
include \masm32\strsafe\strsafe.inc from forementioned
include \masm32\include\masm32.inc
include \masm32\macros\macros.asm
includelib \masm32\lib\user32.lib
includelib \masm32\strsafe\strsafe.lib from sdk
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\msvcrt.lib
includelib \masm32\lib\masm32.lib
______snip_________
...
Are these the proper prereqs more or less ?
Hi askm,
What's the error message you are receiving?