Author Topic: Oxygen Basic alpha  (Read 31966 times)

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #30 on: September 13, 2010, 05:08:29 AM »
I am working on 64bit Vista Andreas.

Do you have a general purpose IDE you work with? If so then I can try to configure a copy for Oxygen.

Notepad++ looks very promising (but also based on Scintilla)

Personally I do most of my work with Notepad, :) which is fine if you are working with familiar code.

Charles
« Last Edit: September 13, 2010, 05:23:49 AM by cevpegge »

ahadev

  • Guest
Re: Oxygen Basic alpha
« Reply #31 on: September 13, 2010, 05:14:32 AM »
Could it be that Win2K falls in this category from the Scite history page?
"SciTE is no longer supported on Windows 95, 98 or ME" (version 2.10 entry)

Personally I have no problem to use WindowsXP/Vista. I just wanted to tell my observation.
Thanks!

Andreas

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #32 on: September 13, 2010, 05:30:01 AM »

Win2k support is disappearing rapidly. I have an ancient PC with it sitting in the corner covered in cobwebs. Not sure it would cope with being hooked up to the web.

Charles

jcfuller

  • Guest
Re: Oxygen Basic alpha
« Reply #33 on: September 13, 2010, 06:11:40 AM »
Charles,
  The byte array problem is still there. It worked fine for the sample posted here, but when I used an array of 1760 bytes it failed with the same error message.

James

jcfuller

  • Guest
Re: Oxygen Basic alpha
« Reply #34 on: September 13, 2010, 06:49:40 AM »
Charles,
I thought originally the problems were related to attaching resources but that appears not to be the problem.

Something is messed up with the messaging. Select the close from the system menu and it closes but faults. Will not close with the normal X click.

James

Code: [Select]
#basic



dim as  byte dlgtpl(104)=>(1,0,255,255,0,0,0,0,0,0,0,0,0,8,207,16,1,0,10,0,10,0,150,0,100,0,0,0,0,0,73,0,68,0,68,0,95,0,68,0,
    76,0,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,80,48,0,66,0,51,0,15,0,233,3,0,0,66,0,85,0,84,0,84,0,
    79,0,78,0,0,0,73,0,68,0,67,0,95,0,66,0,84,0,78,0,0,0,0,0)


type MSG
  ; 28 bytes
  hwnd    as long
  message as long
  wParam  as long
  lParam  as long
  time    as long
  pt      as point
end type

  dim kernel32,user32,GDI32 as long
  kernel32=LoadLibrary `kernel32.dll`
  user32=LoadLibrary `user32.dll`
  GDI32=LoadLibrary `GDI32.dll`

  bind kernel32
  (
    GetCommandLine  GetCommandLineA   ; @0
    GetModuleHandle GetModuleHandleA  ; @4
    ExitProcess     ExitProcess       ; @4
  )

  bind user32
  (
    LoadIcon         LoadIconA         ; @8
    LoadCursor       LoadCursorA       ; @8
    RegisterClass    RegisterClassA    ; @4
    MessageBox       MessageBoxA       ; @4
    CreateWindowEx   CreateWindowExA   ; @48
    ShowWindow       ShowWindow        ; @8
    UpdateWindow     UpdateWindow      ; @4
    GetMessage       GetMessageA       ; @16
    TranslateMessage TranslateMessage  ; @4
    DispatchMessage  DispatchMessageA  ; @4
    PostQuitMessage  PostQuitMessage   ; @4
    BeginPaint       BeginPaint        ; @8
    EndPaint         EndPaint          ; @8
    GetClientRect    GetClientRect     ; @8 
    DrawText         DrawTextA         ; @20
    PostMessage      PostMessageA      ; @16
    DefWindowProc    DefWindowProcA    ; @16
    DialogBoxParam   DialogBoxParamA ;@20   
DialogBoxIndirectParam DialogBoxIndirectParamA ;@20   
    EndDialog EndDialogA ;@8   
  )


  bind GDI32
  (
    GetStockObject   GetStockObject    ; @4
  )

% WM_DESTROY    2
% WM_CLOSE     16
% WM_SYSCOMMAND       = 0x0112
% SC_CLOSE        = 0xF060
% WM_COMMAND          = 0x0111
  % CS_VREDRAW      1
  % CS_HREDRAW      2
  % IDI_APPLICATION 32512
  % IDC_ARROW       32512
  % WHITE_BRUSH     0
  % MB_ICONERROR    16





  declare Function WinMain(byval inst as long ,byval prevInst as long ,byval cmdline as asciiz , byval show as long) as long
  declare function WndProc(byval hWnd as long, byval wMsg as long, byval wParam as long, byval lparam as long) as long
                      '
  def SW_NORMAL 1
  def SW_SHOWDEFAULT 10



  ;=====================================
 
  dim byref cmdline as asciiz,inst as long

  &cmdline=GetCommandLine
  inst=GetModuleHandle 0
  'print cmdline `
  '` hex inst

  WinMain inst,0,cmdline,SW_NORMAL
  '
  freelibrary kernel32
  freelibrary user32
  freelibrary gdi32
  terminate

Function WinMain(byval inst as long ,byval prevInst as long,byval cmdline as asciiz , byval show as long) as long
Dim RetVal as long

RetVal = DialogBoxIndirectParam(inst,&dlgtpl,0,&WndProc,0)
     
  if RetVal == -1 then
    MessageBox 0,`No Resource` ,`Information`,MB_ICONERROR
    exit function
  end if
 
  function=RetVal


End Function
'==============================================================================
Function WndProc (byval hWnd as long,byval wMsg as long, byval wParam as long,byval lparam as long ) as long callback
select wMsg
case WM_DESTROY
PostQuitMessage 0
'case WM_CLOSE
' EndDialog(hWnd,0)
case WM_SYSCOMMAND
if (wParam AND 0xFFF0) == SC_CLOSE then
EndDialog(hWnd,0)
end if
case WM_COMMAND

end select
End Function


cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #35 on: September 13, 2010, 10:35:47 AM »

Hi James,

I've checked the array alignment (16 byte) and also a sample of the array data offsets against Asm code and it all looks correct.

Are you sure the template data is good?

Charles

jcfuller

  • Guest
Re: Oxygen Basic alpha
« Reply #36 on: September 13, 2010, 11:43:38 AM »
I'm pretty sure it's good otherwise it would not show. The reason I went this route is to double check the resource problem. I get the same resuls?

James

jcfuller

  • Guest
Re: Oxygen Basic alpha
« Reply #37 on: September 13, 2010, 12:00:32 PM »
I just tried almost identical code with PowerBASIC and it worked fine.

James

ahadev

  • Guest
Re: Oxygen Basic alpha
« Reply #38 on: September 13, 2010, 12:13:48 PM »
Charles,

now I have another problem on WinXP SP3. If I want to unpack the archive my antivirus software Avira Antivir Personal tells me that in almost every exe file there is the trojan horse "TR/Crypt.XPACK.Gen2". Is it save to ignore this alert? I just want to be sure before I test the compiler.

Andreas

JRS

  • Guest
Re: Oxygen Basic alpha
« Reply #39 on: September 13, 2010, 12:23:55 PM »
I use Kaspersky Internet Security and have no problems with Charles's compiler or the executables they create. Kaspersky is a gold standard all other anti-virus software try to imitate. I think you are safe to ignore the messages your getting from the anti-virus software your using.


ahadev

  • Guest
Re: Oxygen Basic alpha
« Reply #40 on: September 13, 2010, 03:07:18 PM »
It works without any problem if I ignore the warning, but it is really annoying because this requester shows on every exe file even on the examples. I will try to contact the support of antivir.

efgee

  • Guest
Re: Oxygen Basic alpha
« Reply #41 on: September 13, 2010, 03:30:58 PM »
Used Avira Antivirus for several years (because it was free) but had to ditch it because of the increase of false positives; especially with programs compiled from tcc and other small compilers/assemblers.

IMHO Microsoft is the only entity that has a truly genuine interest to keep the Windows-OS clean from viruses and on the same time the Antivirus software as out-off-the-way as possible in order to keep their own (slow) programs as responsive as possible.

Microsoft Essentials Antivirus does exactly that.

Oxygen compiled programs are fine.

;D
« Last Edit: September 13, 2010, 03:34:35 PM by efgee »

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #42 on: September 13, 2010, 04:38:45 PM »

You will get some interesting results here:

http://www.virustotal.com/


cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #43 on: September 13, 2010, 06:05:00 PM »
James,

Is there a problem invoking a dialog box without a parent window?
Answer: no. I created a window and invoked the dialog modally when the spacebace is pressed. Same result

Charles
« Last Edit: September 13, 2010, 06:39:20 PM by cevpegge »

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #44 on: September 14, 2010, 04:03:53 PM »
James,

At last! Here is the cure: :)

In the binding for User32.dll:

Replace

    EndDialog       EndDialogA      ;@8   

With

    EndDialog       EndDialog      ;@8   

This kind of error should be trapped at run time. I must find out why this is not happening.

Now you should be able to create the dialog direct from a resource.

Charles