Sign in to follow this  
Followers 0
MrCreatoR

_SingleTon() Error!

3 posts in this topic

Hi to all,

I was trying to use a _SingleTon() function, and getting this error:

Line 0 (File "C:\Tester.exe"):

Local $ret = DllCall("Kernel32.dll", "int", "MultiByteToWideChar", "int", $codePage, "int", 0, "str", $anyString, "int", StringLen($anyString), "ptr", DllStructGetPtr($buf), "int", $bufSize)

Error: AutoIt has encountered a fatal crash as a result of:

Unable to execute DLLCall

I using this function when i run the script with Command Line, like that:

#include <Misc.au3>

If $CmdLine[1] = "/MyCmd" Then
    If _Singleton("test\test", 1) = 0 Then Exit
   ;...... Do stuff...
EndIf

But after restart the windows, i can not repeat the error, now it is not shown, but why is this happened, is there some mistake in _SingleTon() func? how can i fix it that in the future the same error will not appear?

Thanks.


Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

MultiByteToWideChar is only used in

A3L library and Memory.au3 library... _SingleTon() is in the Misc.au3 library, I don't see the correlation between the error and the example script.

Edit:

What my phrase finder program found:

CODE

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LListView.au3

Line Number: 2410

Line Text: $tHeader = _API_MultiByteToWideChar($sHeader)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LListView.au3

Line Number: 2584

Line Text: $tBuffer = _API_MultiByteToWideChar($sText)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 68

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 71

Line Text: $tQualifier = _API_MultiByteToWideChar($sQualifier)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 120

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 165

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 169

Line Text: $tBaseName = _API_MultiByteToWideChar($sBaseName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 173

Line Text: $tUserName = _API_MultiByteToWideChar($sUserName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 236

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 277

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 281

Line Text: $tClientName = _API_MultiByteToWideChar($sClientName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 285

Line Text: $tUserName = _API_MultiByteToWideChar($sUserName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 327

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 331

Line Text: $tClientName = _API_MultiByteToWideChar($sClientName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 335

Line Text: $tUserName = _API_MultiByteToWideChar($sUserName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 402

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 404

Line Text: $tClientName = _API_MultiByteToWideChar($sClientName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 406

Line Text: $tUserName = _API_MultiByteToWideChar($sUserName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 460

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 463

Line Text: $tShareName = _API_MultiByteToWideChar($sShareName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 465

Line Text: $tPath = _API_MultiByteToWideChar($sPath)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 468

Line Text: $tComment = _API_MultiByteToWideChar($sComment)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 505

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 508

Line Text: $tShareName = _API_MultiByteToWideChar($sShareName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 533

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 536

Line Text: $tShareName = _API_MultiByteToWideChar($sShareName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 582

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 661

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 664

Line Text: $tShareName = _API_MultiByteToWideChar($sShareName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 712

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 715

Line Text: $tShareName = _API_MultiByteToWideChar($sShareName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 718

Line Text: $tComment = _API_MultiByteToWideChar($sComment)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 767

Line Text: $tServerName = _API_MultiByteToWideChar($sServerName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 770

Line Text: $tService = _API_MultiByteToWideChar("LanmanServer")

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 864

Line Text: $tWorkStation = _API_MultiByteToWideChar($sWorkStation)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LNetShare.au3

Line Number: 867

Line Text: $tService = _API_MultiByteToWideChar("LanmanWorkstation")

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LTime.au3

Line Number: 644

Line Text: $tStdName = _API_MultiByteToWideChar($sStdName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LTime.au3

Line Number: 645

Line Text: $tDayName = _API_MultiByteToWideChar($sDayName)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LToolTip.au3

Line Number: 1070

Line Text: $tBuffer = _API_MultiByteToWideChar($sStyle)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LWinAPI.au3

Line Number: 2119

Line Text: Func _API_MultiByteToWideChar($sText, $iCodePage=0, $iFlags=0)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LWinAPI.au3

Line Number: 2125

Line Text: $aResult = DllCall("Kernel32.dll", "int", "MultiByteToWideChar", "int", $iCodePage, "int", $iFlags, _

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LWinAPI.au3

Line Number: 2127

Line Text: _Lib_Check("_API_MultiByteToWideChar", $aResult[0]=0, 0, True)

################################################

File Name: C:\Program Files\AutoIt3\Include\A3LWNet.au3

Line Number: 1005

Line Text: $tDevice = _API_MultiByteToWideChar($sDevice)

################################################

File Name: C:\Program Files\AutoIt3\Include\Memory.au3

Line Number: 401

Line Text: Func _MultiByteToWideChar($s_Text, $i_CodePage = 0, $i_Flags = 1)

################################################

File Name: C:\Program Files\AutoIt3\Include\Memory.au3

Line Number: 405

Line Text: DllCall("Kernel32.dll", "int", "MultiByteToWideChar", "int", $i_CodePage, "int", $i_Flags, _

################################################

File Name: C:\Program Files\AutoIt3\Include\Memory.au3

Line Number: 409

Line Text: EndFunc ;==>_MultiByteToWideCha

################################################

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Hi SmOke_N. Sorry that i not answer here...

I don't see the correlation between the error and the example script

I sure that error is from that function, becasu when i comment it (with ;), and recompile the file, the error was not shown.

I am still can not reproduce the error, i don't realy know how, or why it happend, maby this is because of memory full?


Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0