Recent Posts

Pages: [1] 2 3 ... 10
Beginner questions / Re: Run Google Earth
« Last post by John Z on July 03, 2024, 10:44:54 AM »
Thanks TimoVJL!

I had forgotten webview and all the work you and frankie did getting it functional.

John Z
Assembly discussions / String with random characters
« Last post by Vortex on July 02, 2024, 09:02:13 PM »
Simple random character generator using cryptographic functions.

Code: [Select]
.model flat,stdcall
option casemap:none



buffer      db 64 dup(?)



    call    main
    invoke  ExitProcess,0

main PROC uses esi edi ebx


    invoke  RandomBytes,64,ADDR buffer

    mov     esi,OFFSET buffer
    mov     edi,26
    mov     counter,64
    mov     ebx,1
    movzx   eax,BYTE PTR [esi]
    xor     edx,edx
    div     edi
    and     eax,ebx
    shl     eax,5
    lea     edx,[edx+eax+65]
    mov     BYTE PTR [esi],dl
    add     esi,ebx 
    sub     counter,ebx
    jnz     @b
    invoke  printf,ADDR buffer

main ENDP

RandomBytes PROC dwLength:DWORD,pBuffer:DWORD


    xor     eax,eax
    invoke  CryptAcquireContext,ADDR hProvider,eax,eax,\
    invoke  CryptGenRandom,hProvider,dwLength,pBuffer
    invoke  CryptReleaseContext,hProvider,0

RandomBytes ENDP

END start
Beginner questions / Re: Run Google Earth
« Last post by TimoVJL on July 02, 2024, 10:46:41 AM »
Beginner questions / Re: Run Google Earth
« Last post by John Z on July 02, 2024, 10:31:33 AM »
Hi anatolewilson,

Welcome to the forum!

To do what you are thinking you can invoke a COM object/method to open a web interface from within your program.

I think the attached webbrowser project will get you started.  I am not the author and I am embarrassed to say I don't recall where I originally found it.  Possibly here: but I'm not sure.

Unzip it and run BrowseApp.exe.   If it looks workable to you dive into the code by opening the Pelles C BrowseApp.ppj file, and modify to your hearts content. 

Hope it helps.

John Z
Beginner questions / Run Google Earth
« Last post by anatolewilson on July 02, 2024, 04:32:10 AM »
I have a window into which I would like to run Google Earth.
With CreateProcess Google Earth runs but outside my program.
How could I do?
I thought searching for the window hadle of Google Earth and setting it has a child window of my program.
Is it a solution?
Assembly discussions / Re: Trimming spaces and tabs inside a string
« Last post by Vortex on June 21, 2024, 08:31:34 PM »
Another version :

Code: [Select]
.model flat,stdcall
option casemap:none

ExitProcess PROTO :DWORD

includelib  \PellesC\lib\Win\kernel32.lib
includelib  \PellesC\lib\Win\user32.lib
includelib  msvcrt.lib


mystr       db '    This    Is   A       Test String.',0
message     db 'Trimmed string = %s',13,10
            db 'Length of the string = %u',0


buffer      db 64 dup(?)


RemoveSpaces PROC str1:DWORD,buff:DWORD

    mov     ecx,str1
    mov     edx,buff
    movzx   eax,BYTE PTR [ecx]
    mov     BYTE PTR [edx],al
    add     ecx,1

    xor     al,32
    mov     ah,al
    xor     al,41
    and     ah,al
    add     ah,0FFh
    adc     edx,0

    cmp     al,9
    jne     @b


    mov     eax,edx
    sub     eax,buff

RemoveSpaces ENDP


    invoke  RemoveSpaces,ADDR mystr,ADDR buffer
    invoke  printf,ADDR message,ADDR buffer,eax
    invoke  ExitProcess,0

END start
Beginner questions / Re: Question about sqlite max AND min
« Last post by John Z on June 21, 2024, 11:05:24 AM »
Hi timharvey,

I'm no expert but I reached out to a heavy user who said:

"For the Guy if he has a large number of records he must do two queries, one for max and one for min each one must be into a transaction"

Hope this helps.  This site does have SQL users but of course it is mainly about C and some assembly.

John Z
General discussion / Re: Who pays and how much to use Pelles C?
« Last post by John Z on June 21, 2024, 10:54:52 AM »
Hi WiiLF23,

Congratulations on achieving your goal, hope it is a winner for you.
Share where it is advertised?

AFAIK Pelle has stopped accepting donations. 

I think you have moved to the dark-side though with 'subscriptions'   :(
IMO for individuals minor upgrades should be free, and a modest charge made for a major upgrade.

Not related to your software situation but as an individual I will never use software that I must pay every month to use or lose it.  (MS 365 - no thanks!)

Business using it on the other hand might be another story though since they have for a long time been licensing often on a yearly basis.

John Z
General discussion / Re: Who pays and how much to use Pelles C?
« Last post by WiiLF23 on June 21, 2024, 04:16:01 AM »
I will also be making a donation, as Pelles C has made our file sharing software easily possible for which we allow subscription-based upgrades within the application. Very thankful.
Assembly discussions / Re: Trimming spaces and tabs inside a string
« Last post by John Z on June 17, 2024, 12:53:01 PM »
Even more tricky (sophisticated?)  One must realize that 9 xor 32 is 41  :)


John Z
Pages: [1] 2 3 ... 10