Skip to content

Commit 81c00ac

Browse files
committed
fixup! feat: Expose ScnLoadData.RequestId()
1 parent db843bd commit 81c00ac

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sciter.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,18 @@ var (
134134
// \param[in] data \b LPBYTE, pointer to data buffer.
135135
// \param[in] requestId \b LPVOID, SCN_LOAD_DATA requestId.
136136
// \return \b BOOL, TRUE if Sciter accepts the data or \c FALSE if error occured
137-
func (s *Sciter) DataReadyAsync(uri string, data []byte, requestId C.LPVOID) bool {
137+
func (s *Sciter) DataReadyAsync(uri string, data []byte, requestId C.HREQUEST) bool {
138138
// args
139139
var pData C.LPCBYTE
140140
if len(data) > 0 {
141141
pData = (C.LPCBYTE)(unsafe.Pointer(&data[0]))
142142
}
143143
curi := StringToWcharPtr(uri)
144144
cdataLength := C.UINT(len(data))
145+
crequestId := C.LPVOID(requestId)
145146

146147
// cgo call
147-
ret := C.SciterDataReadyAsync(s.hwnd, curi, pData, cdataLength, requestId)
148+
ret := C.SciterDataReadyAsync(s.hwnd, curi, pData, cdataLength, crequestId)
148149
if ret == 0 {
149150
return false
150151
}

types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ func (s *ScnLoadData) Uri() string {
10081008
return Utf16ToString((*uint16)(unsafe.Pointer(s.uri)))
10091009
}
10101010

1011-
func (s *ScnLoadData) RequestId() C.LPVOID {
1011+
func (s *ScnLoadData) RequestId() C.HREQUEST {
10121012
return s.requestId
10131013
}
10141014

0 commit comments

Comments
 (0)