Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than coredll, prefix the name with the module name and a period.
WriteFile (coredll)
coredll is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for WriteFile in other DLLs exists, click on Find References to the right.
Declare Function WriteFile Lib "coredll.dll" (TODO) As TODO
VB Signature:
Public Declare Function WriteFile Lib "coredll" ( _
ByVal hFile As Long, _
ByVal lpBuffer As String, _
ByVal nNumberOfBytesToWrite As Long, _
lpNumberOfBytesWritten As Long, _
ByVal lpOverlapped As Long) As Long
User-Defined Types:
Public Const CREATE_ALWAYS = 2
Public Const OPEN_ALWAYS = 4
Public Const GENERIC_READ = &H80000000
Public Const GENERIC_WRITE = &H40000000
Public Const FILE_END As Long = 2
Public Const CREATE_ALWAYS = 2
Public Const OPEN_ALWAYS = 4
Public Const GENERIC_READ = &H80000000
Public Const GENERIC_WRITE = &H40000000
Public Const FILE_END As Long = 2
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
Private Function WriteString(MyString As String) As Boolean
Private Function WriteString(MyString As String) As Boolean
Dim lWritten As Long
Dim flag As Long
Dim hFile As Long
If optOverwrite Then
flag = CREATE_ALWAYS
Else
flag = OPEN_ALWAYS
End If
If optAppend.Value Then
SetFilePointer hFile, 0, 0, FILE_END
End If
If hFile <> -1 Then
WriteFile hFile, MyString, LenB(MyString), lWritten, 0
CloseHandle hFile
End If
End Function
End Function
Alternative Managed API:
TODO
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).