Results 1 to 27 of 27

Thread: Vb6 Community Compiler

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2017
    Posts
    75

    Vb6 Community Compiler

    I am working on a project that would transform the vb6 code into an asm code and thus call an asm compiler (NASM, GOASM, etc) and generate the executable, I already have enough material and I already have some code done. I already have rudimentary IDE, a module that transforms basic into a sequence of "simple commands" to better transform into assembler and I'm working on generating asm code from these "simple commands".

    What do you think ?
    Could someone help with some material / work?
    All constructive information will be welcome.

  2. #2
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,721

    Re: Vb6 Community Compiler

    so, what are the benefit with this asm compiler?
    i can get, that we have both vb6 and asm in-one, The trick did something if i remember correctly for the purpose, but you mean convert vb6 to asm. for what end?

  3. #3
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: Vb6 Community Compiler

    Quote Originally Posted by baka View Post
    ...you mean convert vb6 to asm. for what end?
    He wrote that already: "...and thus call an asm compiler (NASM, GOASM, etc) and generate the executable..."

    @germano
    Personally I think, that it's a better idea, to emit C-Code instead of ASM.

    There is two existing basic-compilers I know, which started out with an ASM-emitter.
    - O2Basic: (where attempts were made, to switch to a C-Emitter later - though then the efforts were cancelled due to "too much work")
    - FreeBasic: (where a later switch to a C-emitter succeeded, though not without causing huge efforts on the side of the developers)

    So (IMO) - it'd be a better idea, to plan for (and implement) emitting C-Code "right from the start"...
    This has a lot of advantages, since C-Compilers (which then take over for the final compile-step) have built-in optimizers -
    and are also able to translate to Assembly-instructions for a whole range of CPU-architectures.

    Olaf

  4. #4
    PowerPoster
    Join Date
    Feb 2015
    Posts
    2,671

    Re: Vb6 Community Compiler

    I am working on a project that would transform the vb6 code into an asm code and thus call an asm compiler
    Use the /Fa compiler option.
    Just example:
    Code:
    Option Explicit
    
    Sub Main()
        
        MsgBox GetString, vbCritical
        
    End Sub
    
    Private Function GetString() As String
        GetString = "Hello world!"
    End Function
    Asm code:
    Code:
    	TITLE	C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    	.386P
    include listing.inc
    if @Version gt 510
    .model FLAT
    else
    _TEXT	SEGMENT PARA USE32 PUBLIC 'CODE'
    _TEXT	ENDS
    _DATA	SEGMENT DWORD USE32 PUBLIC 'DATA'
    _DATA	ENDS
    CONST	SEGMENT DWORD USE32 PUBLIC 'CONST'
    CONST	ENDS
    _BSS	SEGMENT DWORD USE32 PUBLIC 'BSS'
    _BSS	ENDS
    _TLS	SEGMENT DWORD USE32 PUBLIC 'TLS'
    _TLS	ENDS
    text$1	SEGMENT PARA USE32 PUBLIC ''
    text$1	ENDS
    ;	COMDAT ?Main@modMain@@AAGXXZ
    text$1	SEGMENT PARA USE32 PUBLIC ''
    text$1	ENDS
    ;	COMDAT ?GetString@modMain@@AAGXXZ
    text$1	SEGMENT PARA USE32 PUBLIC ''
    text$1	ENDS
    FLAT	GROUP _DATA, CONST, _BSS
    	ASSUME	CS: FLAT, DS: FLAT, SS: FLAT
    endif
    PUBLIC	?Main@modMain@@AAGXXZ				; modMain::Main
    PUBLIC	?GetString@modMain@@AAGXXZ			; modMain::GetString
    EXTRN	__imp_@__vbaStrMove:NEAR
    EXTRN	__imp____vba@071B35A8:NEAR
    EXTRN	__imp_@__vbaFreeStr:NEAR
    EXTRN	__imp____vbaFreeVarList:NEAR
    EXTRN	___vbaExceptHandler:NEAR
    EXTRN	__except_list:DWORD
    ;	COMDAT CONST
    ; File C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    CONST	SEGMENT
    $S30	DB	04H, 00H
    	DB	04H, 00H
    	DB	00H, 00H, 00H, 00H
    	DB	00H, 00H, 00H, 00H
    	DD	FLAT:$L29
    CONST	ENDS
    ;	COMDAT ?Main@modMain@@AAGXXZ
    text$1	SEGMENT
    _unnamed_var1$ = -20
    _unnamed_var1$ = -36
    _unnamed_var1$ = -52
    _unnamed_var1$ = -68
    _unnamed_var1$ = -84
    __$SEHRec$ = -16
    ?Main@modMain@@AAGXXZ PROC NEAR				; modMain::Main, COMDAT
    ; File C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    ; Line 4
    	push	ebp
    	mov	ebp, esp
    	sub	esp, 8
    	push	OFFSET FLAT:___vbaExceptHandler
    	mov	eax, DWORD PTR fs:__except_list
    	push	eax
    	mov	DWORD PTR fs:__except_list, esp
    	sub	esp, 124				; 0000007cH
    	push	ebx
    	push	esi
    	push	edi
    	mov	DWORD PTR __$SEHRec$[ebp+8], esp
    	mov	DWORD PTR __$SEHRec$[ebp+12], OFFSET FLAT:$S30
    	xor	esi, esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    ; Line 6
    	call	?GetString@modMain@@AAGXXZ		; modMain::GetString
    	mov	edx, eax
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	call	DWORD PTR __imp_@__vbaStrMove
    	mov	eax, 10					; 0000000aH
    	mov	ecx, -2147352572			; 80020004H
    	mov	DWORD PTR _unnamed_var1$[ebp], eax
    	mov	DWORD PTR _unnamed_var1$[ebp], eax
    	mov	DWORD PTR _unnamed_var1$[ebp], eax
    	mov	eax, DWORD PTR _unnamed_var1$[ebp]
    	mov	DWORD PTR _unnamed_var1$[ebp+8], eax
    	mov	DWORD PTR _unnamed_var1$[ebp+8], ecx
    	mov	DWORD PTR _unnamed_var1$[ebp+8], ecx
    	mov	DWORD PTR _unnamed_var1$[ebp+8], ecx
    	lea	eax, DWORD PTR _unnamed_var1$[ebp]
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	push	eax
    	lea	edx, DWORD PTR _unnamed_var1$[ebp]
    	push	ecx
    	push	edx
    	lea	eax, DWORD PTR _unnamed_var1$[ebp]
    	push	16					; 00000010H
    	push	eax
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], 8
    	call	DWORD PTR __imp____vba@071B35A8
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	call	DWORD PTR __imp_@__vbaFreeStr
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	lea	edx, DWORD PTR _unnamed_var1$[ebp]
    	push	ecx
    	lea	eax, DWORD PTR _unnamed_var1$[ebp]
    	push	edx
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	push	eax
    	push	ecx
    	push	4
    	call	DWORD PTR __imp____vbaFreeVarList
    	add	esp, 20					; 00000014H
    	push	$L59
    	jmp	SHORT $L54
    $L29:
    ; Line 8
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	call	DWORD PTR __imp_@__vbaFreeStr
    	lea	edx, DWORD PTR _unnamed_var1$[ebp]
    	lea	eax, DWORD PTR _unnamed_var1$[ebp]
    	push	edx
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	push	eax
    	lea	edx, DWORD PTR _unnamed_var1$[ebp]
    	push	ecx
    	push	edx
    	push	4
    	call	DWORD PTR __imp____vbaFreeVarList
    	add	esp, 20					; 00000014H
    	ret	0
    $L54:
    $L57:
    	ret	0
    $L59:
    	mov	ecx, DWORD PTR __$SEHRec$[ebp]
    	pop	edi
    	pop	esi
    	mov	DWORD PTR fs:__except_list, ecx
    	pop	ebx
    	mov	esp, ebp
    	pop	ebp
    	ret	0
    ?Main@modMain@@AAGXXZ ENDP				; modMain::Main
    text$1	ENDS
    EXTRN	__imp_@__vbaStrCopy:NEAR
    EXTRN	___vba@071B348C:BYTE
    ;	COMDAT CONST
    ; File C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    CONST	SEGMENT
    $S41	DB	08H, 00H
    	DB	04H, 00H
    	DB	00H, 00H, 00H, 00H
    	DB	00H, 00H, 00H, 00H
    	DD	FLAT:$L40
    CONST	ENDS
    ;	COMDAT ?GetString@modMain@@AAGXXZ
    text$1	SEGMENT
    _GetString$ = -20
    __$SEHRec$ = -16
    ?GetString@modMain@@AAGXXZ PROC NEAR			; modMain::GetString, COMDAT
    ; File C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    ; Line 10
    	push	ebp
    	mov	ebp, esp
    	sub	esp, 8
    	push	OFFSET FLAT:___vbaExceptHandler
    	mov	eax, DWORD PTR fs:__except_list
    	push	eax
    	mov	DWORD PTR fs:__except_list, esp
    	sub	esp, 8
    	push	ebx
    	push	esi
    	push	edi
    	mov	DWORD PTR __$SEHRec$[ebp+8], esp
    	mov	DWORD PTR __$SEHRec$[ebp+12], OFFSET FLAT:$S41
    ; Line 11
    	mov	edx, OFFSET FLAT:___vba@071B348C
    	lea	ecx, DWORD PTR _GetString$[ebp]
    	mov	DWORD PTR _GetString$[ebp], 0
    	call	DWORD PTR __imp_@__vbaStrCopy
    	push	$L71
    	jmp	SHORT $L66
    $L40:
    ; Line 12
    	lea	ecx, DWORD PTR _GetString$[ebp]
    	call	DWORD PTR __imp_@__vbaFreeStr
    	ret	0
    $L66:
    $L69:
    	ret	0
    $L71:
    	mov	ecx, DWORD PTR __$SEHRec$[ebp]
    	mov	eax, DWORD PTR _GetString$[ebp]
    	pop	edi
    	pop	esi
    	mov	DWORD PTR fs:__except_list, ecx
    	pop	ebx
    	mov	esp, ebp
    	pop	ebp
    	ret	0
    ?GetString@modMain@@AAGXXZ ENDP				; modMain::GetString
    text$1	ENDS
    END

  5. #5
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    Quote Originally Posted by The trick View Post
    Use the /Fa compiler option.
    Just example:
    Code:
    Option Explicit
    
    Sub Main()
        
        MsgBox GetString, vbCritical
        
    End Sub
    
    Private Function GetString() As String
        GetString = "Hello world!"
    End Function
    Asm code:
    Code:
    	TITLE	C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    	.386P
    include listing.inc
    if @Version gt 510
    .model FLAT
    else
    _TEXT	SEGMENT PARA USE32 PUBLIC 'CODE'
    _TEXT	ENDS
    _DATA	SEGMENT DWORD USE32 PUBLIC 'DATA'
    _DATA	ENDS
    CONST	SEGMENT DWORD USE32 PUBLIC 'CONST'
    CONST	ENDS
    _BSS	SEGMENT DWORD USE32 PUBLIC 'BSS'
    _BSS	ENDS
    _TLS	SEGMENT DWORD USE32 PUBLIC 'TLS'
    _TLS	ENDS
    text$1	SEGMENT PARA USE32 PUBLIC ''
    text$1	ENDS
    ;	COMDAT ?Main@modMain@@AAGXXZ
    text$1	SEGMENT PARA USE32 PUBLIC ''
    text$1	ENDS
    ;	COMDAT ?GetString@modMain@@AAGXXZ
    text$1	SEGMENT PARA USE32 PUBLIC ''
    text$1	ENDS
    FLAT	GROUP _DATA, CONST, _BSS
    	ASSUME	CS: FLAT, DS: FLAT, SS: FLAT
    endif
    PUBLIC	?Main@modMain@@AAGXXZ				; modMain::Main
    PUBLIC	?GetString@modMain@@AAGXXZ			; modMain::GetString
    EXTRN	__imp_@__vbaStrMove:NEAR
    EXTRN	__imp____vba@071B35A8:NEAR
    EXTRN	__imp_@__vbaFreeStr:NEAR
    EXTRN	__imp____vbaFreeVarList:NEAR
    EXTRN	___vbaExceptHandler:NEAR
    EXTRN	__except_list:DWORD
    ;	COMDAT CONST
    ; File C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    CONST	SEGMENT
    $S30	DB	04H, 00H
    	DB	04H, 00H
    	DB	00H, 00H, 00H, 00H
    	DB	00H, 00H, 00H, 00H
    	DD	FLAT:$L29
    CONST	ENDS
    ;	COMDAT ?Main@modMain@@AAGXXZ
    text$1	SEGMENT
    _unnamed_var1$ = -20
    _unnamed_var1$ = -36
    _unnamed_var1$ = -52
    _unnamed_var1$ = -68
    _unnamed_var1$ = -84
    __$SEHRec$ = -16
    ?Main@modMain@@AAGXXZ PROC NEAR				; modMain::Main, COMDAT
    ; File C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    ; Line 4
    	push	ebp
    	mov	ebp, esp
    	sub	esp, 8
    	push	OFFSET FLAT:___vbaExceptHandler
    	mov	eax, DWORD PTR fs:__except_list
    	push	eax
    	mov	DWORD PTR fs:__except_list, esp
    	sub	esp, 124				; 0000007cH
    	push	ebx
    	push	esi
    	push	edi
    	mov	DWORD PTR __$SEHRec$[ebp+8], esp
    	mov	DWORD PTR __$SEHRec$[ebp+12], OFFSET FLAT:$S30
    	xor	esi, esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    ; Line 6
    	call	?GetString@modMain@@AAGXXZ		; modMain::GetString
    	mov	edx, eax
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	call	DWORD PTR __imp_@__vbaStrMove
    	mov	eax, 10					; 0000000aH
    	mov	ecx, -2147352572			; 80020004H
    	mov	DWORD PTR _unnamed_var1$[ebp], eax
    	mov	DWORD PTR _unnamed_var1$[ebp], eax
    	mov	DWORD PTR _unnamed_var1$[ebp], eax
    	mov	eax, DWORD PTR _unnamed_var1$[ebp]
    	mov	DWORD PTR _unnamed_var1$[ebp+8], eax
    	mov	DWORD PTR _unnamed_var1$[ebp+8], ecx
    	mov	DWORD PTR _unnamed_var1$[ebp+8], ecx
    	mov	DWORD PTR _unnamed_var1$[ebp+8], ecx
    	lea	eax, DWORD PTR _unnamed_var1$[ebp]
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	push	eax
    	lea	edx, DWORD PTR _unnamed_var1$[ebp]
    	push	ecx
    	push	edx
    	lea	eax, DWORD PTR _unnamed_var1$[ebp]
    	push	16					; 00000010H
    	push	eax
    	mov	DWORD PTR _unnamed_var1$[ebp], esi
    	mov	DWORD PTR _unnamed_var1$[ebp], 8
    	call	DWORD PTR __imp____vba@071B35A8
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	call	DWORD PTR __imp_@__vbaFreeStr
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	lea	edx, DWORD PTR _unnamed_var1$[ebp]
    	push	ecx
    	lea	eax, DWORD PTR _unnamed_var1$[ebp]
    	push	edx
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	push	eax
    	push	ecx
    	push	4
    	call	DWORD PTR __imp____vbaFreeVarList
    	add	esp, 20					; 00000014H
    	push	$L59
    	jmp	SHORT $L54
    $L29:
    ; Line 8
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	call	DWORD PTR __imp_@__vbaFreeStr
    	lea	edx, DWORD PTR _unnamed_var1$[ebp]
    	lea	eax, DWORD PTR _unnamed_var1$[ebp]
    	push	edx
    	lea	ecx, DWORD PTR _unnamed_var1$[ebp]
    	push	eax
    	lea	edx, DWORD PTR _unnamed_var1$[ebp]
    	push	ecx
    	push	edx
    	push	4
    	call	DWORD PTR __imp____vbaFreeVarList
    	add	esp, 20					; 00000014H
    	ret	0
    $L54:
    $L57:
    	ret	0
    $L59:
    	mov	ecx, DWORD PTR __$SEHRec$[ebp]
    	pop	edi
    	pop	esi
    	mov	DWORD PTR fs:__except_list, ecx
    	pop	ebx
    	mov	esp, ebp
    	pop	ebp
    	ret	0
    ?Main@modMain@@AAGXXZ ENDP				; modMain::Main
    text$1	ENDS
    EXTRN	__imp_@__vbaStrCopy:NEAR
    EXTRN	___vba@071B348C:BYTE
    ;	COMDAT CONST
    ; File C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    CONST	SEGMENT
    $S41	DB	08H, 00H
    	DB	04H, 00H
    	DB	00H, 00H, 00H, 00H
    	DB	00H, 00H, 00H, 00H
    	DD	FLAT:$L40
    CONST	ENDS
    ;	COMDAT ?GetString@modMain@@AAGXXZ
    text$1	SEGMENT
    _GetString$ = -20
    __$SEHRec$ = -16
    ?GetString@modMain@@AAGXXZ PROC NEAR			; modMain::GetString, COMDAT
    ; File C:\Program Files (x86)\Microsoft Visual Studio\VB98\modMain.bas
    ; Line 10
    	push	ebp
    	mov	ebp, esp
    	sub	esp, 8
    	push	OFFSET FLAT:___vbaExceptHandler
    	mov	eax, DWORD PTR fs:__except_list
    	push	eax
    	mov	DWORD PTR fs:__except_list, esp
    	sub	esp, 8
    	push	ebx
    	push	esi
    	push	edi
    	mov	DWORD PTR __$SEHRec$[ebp+8], esp
    	mov	DWORD PTR __$SEHRec$[ebp+12], OFFSET FLAT:$S41
    ; Line 11
    	mov	edx, OFFSET FLAT:___vba@071B348C
    	lea	ecx, DWORD PTR _GetString$[ebp]
    	mov	DWORD PTR _GetString$[ebp], 0
    	call	DWORD PTR __imp_@__vbaStrCopy
    	push	$L71
    	jmp	SHORT $L66
    $L40:
    ; Line 12
    	lea	ecx, DWORD PTR _GetString$[ebp]
    	call	DWORD PTR __imp_@__vbaFreeStr
    	ret	0
    $L66:
    $L69:
    	ret	0
    $L71:
    	mov	ecx, DWORD PTR __$SEHRec$[ebp]
    	mov	eax, DWORD PTR _GetString$[ebp]
    	pop	edi
    	pop	esi
    	mov	DWORD PTR fs:__except_list, ecx
    	pop	ebx
    	mov	esp, ebp
    	pop	ebp
    	ret	0
    ?GetString@modMain@@AAGXXZ ENDP				; modMain::GetString
    text$1	ENDS
    END
    What is the actual syntax for /Fa in [vbcompiler] c2Switches

    I can never get this to work. It either wont compile because it gets an error processing the flag or seems to do nothing.

    I have tried
    [VBcompiler]
    C2Switches=/Fa
    C2Switches=/FA
    C2Switches=-Fa

    etc

  6. #6

  7. #7
    Addicted Member jg.sa's Avatar
    Join Date
    Nov 2017
    Location
    South Australia ( SA )
    Posts
    198

    Re: Vb6 Community Compiler

    G'Day Germano

    Are you still working on this ?


    Quote Originally Posted by germano.barbosa View Post
    I am working on a project that would transform the vb6 code into an asm code and thus call an asm compiler (NASM, GOASM, etc) and generate the executable
    Very interesting


    Quote Originally Posted by germano.barbosa View Post
    What do you think ?
    This is a gr8 way to break out of M$ design constraints and now .NET stuff up


    Quote Originally Posted by germano.barbosa View Post
    Could someone help with some material / work?
    Are you still wanting help ?

  8. #8
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    Quote Originally Posted by The trick View Post
    Code:
    C2Switches=-FAs -Fa"path"
    thanks Trick

  9. #9
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    So I am still doing something wrong. I am the admin on the box

    fatal error C1083: Cannot open compiler generated file: 'c:\asm': Permission denied

  10. #10

  11. #11
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Vb6 Community Compiler

    Quote Originally Posted by vbwins View Post
    So I am still doing something wrong. I am the admin on the box

    fatal error C1083: Cannot open compiler generated file: 'c:\asm': Permission denied
    Did you really have it write it out to the C:\ ? yeah... I don't think Windows is going to allow that ... try writing it out to a folder somewhere ... your desktop even... or just anywhere anywhere esle other than Windows or your C root ... and try it again... There's some folders that Windows locks down to prevent damage to itself and prevent viruses from running ... C:\ proper is one area where it gets touchy.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  12. #12
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    Quote Originally Posted by techgnome View Post
    Did you really have it write it out to the C:\ ? yeah... I don't think Windows is going to allow that ... try writing it out to a folder somewhere ... your desktop even... or just anywhere anywhere esle other than Windows or your C root ... and try it again... There's some folders that Windows locks down to prevent damage to itself and prevent viruses from running ... C:\ proper is one area where it gets touchy.

    -tg
    I will try that but it has no trouble writing the .obj files and the resulting exe.

  13. #13
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    Quote Originally Posted by The trick View Post
    Attach your project.
    Trick - Do you mean the .vbp file?

  14. #14
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Vb6 Community Compiler

    Quote Originally Posted by vbwins View Post
    Trick - Do you mean the .vbp file?
    He means the entire project. Just put the entire project in a zip file and upload it so he can look at it.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  15. #15
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    Quote Originally Posted by Niya View Post
    He means the entire project. Just put the entire project in a zip file and upload it so he can look at it.
    Sorry. Unable to do for commercial reasons..

  16. #16
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: Vb6 Community Compiler

    Quote Originally Posted by vbwins View Post
    Sorry. Unable to do for commercial reasons..
    Are you not anonymous in these forums or are you paying with a CC for some benefits here?

    When I was employed I had no remorse posting code produced by me during my day job in anonymous forums.

    cheers,
    </wqw>

  17. #17
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Vb6 Community Compiler

    Naw... I think he's reluctant to post the code because he plans to sell it commercially ... if he posts it here, then anyone would be able to swipe it, and he'd lose out on all da big buck$.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  18. #18
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Vb6 Community Compiler

    Quote Originally Posted by wqweto View Post
    When I was employed I had no remorse posting code produced by me during my day job in anonymous forums.
    I get the impression he means that he can't just post his entire commercial project online just like that. I'd recommend he produces a sample of code that just illustrates his problem and nothing more. He can upload just that which is what I think the trick was getting at.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  19. #19
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: Vb6 Community Compiler

    Quote Originally Posted by Niya View Post
    I get the impression he means that he can't just post his entire commercial project online just like that. I'd recommend he produces a sample of code that just illustrates his problem and nothing more. He can upload just that which is what I think the trick was getting at.
    I though he already had a small test project. Why would you want a huge ASM listing of a (moderately sized) commercial project?

    cheers,
    </wqw>

  20. #20
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Vb6 Community Compiler

    Quote Originally Posted by wqweto View Post
    I though he already had a small test project.
    Yea, I thought so too but his statement implied otherwise.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  21. #21
    Fanatic Member 2kaud's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    996

    Re: Vb6 Community Compiler

    When I was employed I had no remorse posting code produced by me during my day job in anonymous forums.
    If the poster is the code owner, then OK. If the poster isn't the code owner then permission from the code owner is required - otherwise you're in breach. If you are employed by a company, your employment contract is likely to stipulate that the company owns what you produce - not you (and if it doesn't then it should). If you're a contractor this should be specified as part of the contract. In the absence of anything, the normal/usual is that the coder owns what they code (although different countries etc may have local variations).
    All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  22. #22
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    Quote Originally Posted by Niya View Post
    Yea, I thought so too but his statement implied otherwise.
    I will post a sample project that gives me the error later today. Its probably some obscure issue to do with my machine.

    The project in question is reasonably large at 170k lines and is the backbone of what we do as a business.

    Why do I want to see the listing? A) To see these C2Switches actually work. B) To learn. C) as a way in future to see what code the compiler is actually generating to assist with optimization.

    At least that is what I hope to achieve.

    thanks for the replies.

  23. #23
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    Quote Originally Posted by The trick View Post
    Attach your project.
    Should be zip attached

    When I compile this I get

    fatal error C1083: Cannot open compiler generated file: 'C:\Program Files\Microsoft Visual Studio\VB98': Permission denied
    Attached Files Attached Files

  24. #24
    Addicted Member jg.sa's Avatar
    Join Date
    Nov 2017
    Location
    South Australia ( SA )
    Posts
    198

    Re: Vb6 Community Compiler

    G'Day vbwins

    Change the compiler options to p-code ( very top ) and this project will complie, link, segment ...

  25. #25
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    Quote Originally Posted by jg.sa View Post
    G'Day vbwins

    Change the compiler options to p-code ( very top ) and this project will complie, link, segment ...
    Indeed it does compile but then it does not call C2.exe so I would expect it to ignore the switches anyway.

  26. #26

  27. #27
    Hyperactive Member
    Join Date
    Mar 2019
    Posts
    414

    Re: Vb6 Community Compiler

    Quote Originally Posted by The trick View Post
    Code:
    C2Switches=-FAs -Fa"C:\temp\ttt.asm"
    Thanks Trick. Works but only produces output for one class in the project. Can I get a listing for each class in the project?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width