@@ -55,7 +55,12 @@ private class ScopedAttributesContainer
5555
5656
5757 [ DllImport ( "BacktraceCrashpadWindows" , EntryPoint = "Initialize" ) ]
58- private static extern bool Initialize ( string submissionUrl , string databasePath , string handlerPath , string [ ] attachments , int attachmentSize ) ;
58+ private static extern bool Initialize (
59+ string submissionUrl ,
60+ [ MarshalAs ( UnmanagedType . LPWStr ) ] string databasePath ,
61+ [ MarshalAs ( UnmanagedType . LPWStr ) ] string handlerPath ,
62+ string [ ] attachments ,
63+ int attachmentSize ) ;
5964
6065 [ DllImport ( "BacktraceCrashpadWindows" , EntryPoint = "AddAttribute" ) ]
6166 private static extern bool AddNativeAttribute ( string key , string value ) ;
@@ -135,13 +140,13 @@ private void HandleNativeCrashes(IDictionary<string, string> clientAttributes, I
135140 AddNativeAttribute ( attribute . Key , attribute . Value == null ? string . Empty : attribute . Value ) ;
136141 }
137142
138- // add exception type to crashes handled by crashpad - all exception handled by crashpad
143+ // add exception type to crashes handled by crashpad - all exception handled by crashpad
139144 // by default we setting this option here, to set error.type when unexpected crash happen (so attribute will present)
140145 // otherwise in other methods - ANR detection, OOM handler, we're overriding it and setting it back to "crash"
141146
142- // warning
143- // don't add attributes that can change over the time to initialization method attributes. Crashpad will prevent from
144- // overriding them on game runtime. ANRs/OOMs methods can override error.type attribute, so we shouldn't pass error.type
147+ // warning
148+ // don't add attributes that can change over the time to initialization method attributes. Crashpad will prevent from
149+ // overriding them on game runtime. ANRs/OOMs methods can override error.type attribute, so we shouldn't pass error.type
145150 // attribute via attributes parameters.
146151 AddNativeAttribute ( ErrorTypeAttribute , CrashType ) ;
147152 }
@@ -195,7 +200,7 @@ public void HandleAnr()
195200 AddNativeAttribute ( ErrorTypeAttribute , HangType ) ;
196201
197202 NativeReport ( AnrMessage , true ) ;
198- // update error.type attribute in case when crash happen
203+ // update error.type attribute in case when crash happen
199204 AddNativeAttribute ( ErrorTypeAttribute , HangType ) ;
200205 }
201206 }
@@ -313,7 +318,7 @@ private string GetDefaultPathToCrashpadHandler(string pluginDirectoryPath)
313318 /// </summary>
314319 internal static void CleanScopedAttributes ( )
315320 {
316- // cleaning scoped attributes should be skipped when
321+ // cleaning scoped attributes should be skipped when
317322 // Configuration.SendUnhandledGameCrashesOnGameStartup is set to false
318323 // the reason behind this decision is to make sure user change in the configuration
319324 // won't leave any useless data
0 commit comments