Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
Merge pull request #13 from riftbit/feat/miniDumpWritedump
Browse files Browse the repository at this point in the history
adding initial typedef/function for miniDumpWritedump
  • Loading branch information
ergoz authored Aug 11, 2019
2 parents ebf744d + 7964882 commit 40d1029
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dbgcore.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package w32

import "syscall"

var (
moddbgcore = syscall.NewLazyDLL("Dbgcore.dll")
miniDumpWritedump = moddbgcore.NewProc("MiniDumpWriteDump")
)

func miniDumpWritedump(hHandle HANDLE, ProcessId DWORD, hFile HANDLE, DumpType MINIDUMP_TYPE, ExceptionParam PMINIDUMP_EXCEPTION_INFORMATION, UserStreamParam PMINIDUMP_USER_STREAM_INFORMATION, CallbackParam PMINIDUMP_CALLBACK_INFORMATION) err {
return nil
}
47 changes: 47 additions & 0 deletions typedef.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,53 @@ type (
WPARAM uintptr
)

type PMINIDUMP_EXCEPTION_INFORMATION struct {
ThreadId DWORD
ExceptionPointers PEXCEPTION_POINTERS // TODO get right data type here
ClientPointers BOOL
}

// https://docs.microsoft.com/en-us/windows/desktop/api/minidumpapiset/ns-minidumpapiset-minidump_user_stream_information
type MINIDUMP_USER_STREAM_INFORMATION struct {
UserStreamCount ULONG
UserStreamArray PMINIDUMP_USER_STREAM // TODO get right data type here
}

// https://docs.microsoft.com/en-us/windows/desktop/api/minidumpapiset/ns-minidumpapiset-minidump_callback_information
type MINIDUMP_CALLBACK_INFORMATION struct {
CallbackRoutine MINIDUMP_CALLBACK_ROUTINE // TODO get right data type here
CallbackParam PVOID
}

// https://docs.microsoft.com/en-us/windows/desktop/api/minidumpapiset/ne-minidumpapiset-_minidump_type
type MINIDUMP_TYPE struct {
MiniDumpNormal uintptr // TODO get right data type here
MiniDumpWithDataSegs uintptr // TODO get right data type here
MiniDumpWithFullMemory uintptr // TODO get right data type here
MiniDumpWithHandleData uintptr // TODO get right data type here
MiniDumpFilterMemory uintptr // TODO get right data type here
MiniDumpScanMemory uintptr // TODO get right data type here
MiniDumpWithUnloadedModules uintptr // TODO get right data type here
MiniDumpWithIndirectlyReferencedMemory uintptr // TODO get right data type here
MiniDumpFilterModulePaths uintptr // TODO get right data type here
MiniDumpWithProcessThreadData uintptr // TODO get right data type here
MiniDumpWithPrivateReadWriteMemory uintptr // TODO get right data type here
MiniDumpWithoutOptionalData uintptr // TODO get right data type here
MiniDumpWithFullMemoryInfo uintptr // TODO get right data type here
MiniDumpWithThreadInfo uintptr // TODO get right data type here
MiniDumpWithCodeSegs uintptr // TODO get right data type here
MiniDumpWithoutAuxiliaryState uintptr // TODO get right data type here
MiniDumpWithFullAuxiliaryState uintptr // TODO get right data type here
MiniDumpWithPrivateWriteCopyMemory uintptr // TODO get right data type here
MiniDumpIgnoreInaccessibleMemory uintptr // TODO get right data type here
MiniDumpWithTokenInformation uintptr // TODO get right data type here
MiniDumpWithModuleHeaders uintptr // TODO get right data type here
MiniDumpFilterTriage uintptr // TODO get right data type here
MiniDumpWithAvxXStateContextuintptr uintptr // TODO get right data type here
MiniDumpWithIptTrace uintptr // TODO get right data type here
MiniDumpValidTypeFlags uintptr // TODO get right data type here
}

// http://msdn.microsoft.com/en-us/library/windows/desktop/dd162805.aspx
type POINT struct {
X, Y int32
Expand Down

0 comments on commit 40d1029

Please sign in to comment.