Author Topic: error with the latest Oxygen DLL  (Read 11969 times)

0 Members and 1 Guest are viewing this topic.

Aurel

  • Guest
Re: error with the latest Oxygen DLL
« Reply #45 on: April 27, 2014, 05:05:09 AM »
Charles
When you say:
- producing more efficient binary

do you mean faster execution?

So i tried two graphic programs with new GetNum() and looks to me that is not
faster than is even slower..is that possible?

I will built right now timer function to test time of execution then  will see.
 ;)

Aurel

  • Guest
Re: error with the latest Oxygen DLL
« Reply #46 on: April 27, 2014, 06:19:22 AM »
After testing
difference are very small in execution but it looks that older DLL work
just a little bit faster then this new one.
it is not strange to me because execution of my small interpreter directly depend on
processing loop which read tokens from string array
so simply there is no significant speed up   :-\

Charles Pegge

  • Guest
Re: error with the latest Oxygen DLL
« Reply #47 on: April 27, 2014, 07:22:41 AM »
Aurel,

Something strange happening when ShellExecute is invoked. Will investigate further.

With regard to performance, the strategy is to reduce the number of string operations, in favour of integer operations, so the CPU has less work to do. That function is only one part of your parser.

PS:

ShellExecute is innocent. The problem was in the FileDialog prototype.

Cleanup for FileDialog:

Defext was defined as 'long', is now  a string
Also using strptr for all string parameters.

FileDialog for awinh.inc
Code: [Select]
'FileDialog( $ iDir , $ filter ,$ title , % parent ,% flag )
Function FileDialog(String Dir, filter , Title , long Hwnd, Flags, string defext) As String
Dim ofn As OPENFILENAME
Dim filename[255] As zstring
INT retval

ofn.lStructSize = 76
ofn.hwndOwner = hWnd
ofn.hInstance = GetModuleHandle(0)
ofn.lpstrFilter = strptr filter
ofn.lpstrCustomFilter= NULL
ofn.nMaxCustFilter = 0
ofn.nFilterIndex = 2
ofn.lpstrFile = strptr filename 'zstring buffer
ofn.nMaxFile = 255
ofn.lpstrFileTitle = NULL
ofn.nMaxFileTitle = 0
ofn.lpstrInitialDir = strptr dir
ofn.lpstrTitle = strptr title
IF Flags = 0 then ofn.Flags = OFN_EXPLORER Or OFN_FILEMUSTEXIST Or OFN_HIDEREADONLY
IF Flags = 1 then ofn.Flags = OFN_EXPLORER Or OFN_OVERWRITEPROMPT Or OFN_HIDEREADONLY
ofn.nFileOffset = 0
ofn.nFileExtension = 0
ofn.lpstrDefExt = strptr defext
ofn.lCustData = 0
ofn.lpfnHook = 0
ofn.lpTemplateName = NULL

' Execute the dialog box
IF Flags = 0 then retval = GetOpenFileName(ofn)
IF Flags = 1 then retval = GetSaveFileName(ofn)

Return filename

End Function
« Last Edit: April 27, 2014, 12:13:07 PM by Charles Pegge »

Aurel

  • Guest
Re: error with the latest Oxygen DLL
« Reply #48 on: April 27, 2014, 08:57:18 AM »
Yes i also think that is something wrong with  shellExecute ...
so problem is in FileDialog  ::)
hmm how then work with old DLL ?

ok i will fix things in FileDialog
thanks  ;)