ASM Community    The Assembly Language Resource

2010-08-01 09:52:26 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   
   Home   Help Search Calendar Login Register  
Pages: 1 [2]
  Print  
Author Topic: ExcelHost problem  (Read 2776 times)
0 Members and 2 Guests are viewing this topic.
NaN
Community Staff
ASM Fanatic
*****
Offline Offline

Posts: 2564



« Reply #15 on: 2004-04-22 23:43:44 »

Your well on your way with COM and Active-X automation.  

As for the macro's, i think you got me misunderstood.  I ment inline to be used in this sort of case
Code:

    ; Stack push order ->
    $NoPar(2) $Par(VT_BOOL, TRUE)
    call [ebx].ComMethod

Which would produce the following code:
Code:
00401C77  |. 6A 00          PUSH 0
00401C79  |. 68 04000280    PUSH 80020004
00401C7E  |. 6A 00          PUSH 0
00401C80  |. 6A 0A          PUSH 0A
00401C82  |. 6A 00          PUSH 0
00401C84  |. 68 04000280    PUSH 80020004
00401C89  |. 6A 00          PUSH 0
00401C8B  |. 6A 0A          PUSH 0A
00401C8D  |. 6A 00          PUSH 0
00401C8F  |. 6A 01          PUSH 1
00401C91  |. 6A 00          PUSH 0
00401C93  |. 6A 0B          PUSH 0B
00401C95  |. E8 DCFFFFFF    CALL [ebx+04]


I hope this is more clear to you.

Below is the macros i used to produce the code above
Code:
NoPar macro Num:=<1>
    LOCAL a1, a2
    a1 equ <Num>
    a2 = 0
    while a1 ne a2
push 0
push DISP_E_PARAMNOTFOUND
push 0
push VT_ERROR
        a2 = a2 + 1
    endm    
endm

Par MACRO v1:=<VT_I4>,v2:=<0>
    if @InStr(1,v1,<VT_R8> ) NE 0
        push    0
        push    DWORD PTR [v2]
        push    0
        push    v1
    else
        push    0
        push    v2
        push    0
        push    v1
    endif
ENDM

VT_ERROR            equ 10
DISP_E_PARAMNOTFOUND                 equ 80020004h



$Par MACRO v1:=<VT_I4>,v2:=<0>
   Par v1, v2
   EXITM <>  ;; Return nothing at all
ENDM


$NoPar macro Num:=<1>
    NoPar Num
    EXITM <>  ;; Return nothing at all
endm


Regards,
:NaN:
Logged

May fortune favor the foolish...
minor28
Code Warrior
**
Offline Offline

Posts: 339


« Reply #16 on: 2004-04-26 19:37:28 »

I have worked the COM tool over and it fullfills my needs now. I have added a VB browser more like the one shiped with VB6.0. I have also added possibility to launch the com help files from help menu or with F1. I believe it is easier to code asm if you can see the corresponding VB code and help.

I have only tested the tool on win2k and Excel. It will only work if you have TLBINF32.dll. This dll i shiped with VB6.0 and Visual studio. I don't know if it is legal to add it to the tool but you can google after it. Registration of the dll can be done with the tool.

The Access file holds the asm code and macros. You can edit the text as you like.

If this tool is interesting for use in general I would be glad if someone will test it and comment it.
Logged

Minor28
minor28
Code Warrior
**
Offline Offline

Posts: 339


« Reply #17 on: 2004-04-28 20:53:17 »

New update version 1.2.0.

- fixed a bug

- You can search constants

- in function listing a third column showing return pointers to function pointer. Clicking on the pointer opens the new function members, even if the function is in an external library.
Logged

Minor28
ipadilla
Code Warrior
**
Offline Offline

Posts: 106


« Reply #18 on: 2004-05-03 04:23:22 »

Hi Minor28,

Error when starting com.exe under windows 2000 sp3.

Regards
ipadilla
Logged

Please, be polite and I will not be rude.
minor28
Code Warrior
**
Offline Offline

Posts: 339


« Reply #19 on: 2004-05-03 18:28:28 »

Hi ipadilla,

I don't understand spanish. It looks like: error during startup. Can't find name of database  and terminating the application or something.

Have you copied the Com.mdb to application folder. It is an access database with code snippets and macros.
Logged

Minor28
ipadilla
Code Warrior
**
Offline Offline

Posts: 106


Bug
« Reply #20 on: 2004-05-04 04:46:51 »

Hi Minor28,

Excuse me, you are right "it is a running time error".
"ODBC administrator controler can not find the  origen of data  name. No one controler is defined."

This error ocurr when startup and the application finish.  Database and com.exe are in the same directory.
I have check it under W2k+ sp3, WinXP+sp1 and Win98 SE. I always have the same error.

I only can running your first post without database, after including the database I always get the present error.

Can you  help me, please?

regards
ipadilla
Logged

Please, be polite and I will not be rude.
minor28
Code Warrior
**
Offline Offline

Posts: 339


« Reply #21 on: 2004-05-04 18:50:06 »

I have tested it on win98  and win2k but I can't get that error. I have removed an unused reference. Could be that one.
Logged

Minor28
ipadilla
Code Warrior
**
Offline Offline

Posts: 106


« Reply #22 on: 2004-05-17 05:04:56 »

Hi Minor28,

I have checked your las Com.exe under Windows 98 SE, Windows 2000 + sp4 and Windows XP+ sp1 and I always get the following error:  

Error '-2247467259 [800040005]? at execution time.

Origen of data name can not be found and there is not predeterminate controler.

Please, how can I resolve the problem?
Thank you
ipadilla
Logged

Please, be polite and I will not be rude.
minor28
Code Warrior
**
Offline Offline

Posts: 339


« Reply #23 on: 2004-05-19 19:01:45 »

Com.exe is a VB 6.0 program. To run it presume that you have VB installed on your computer because no components are shipped with the exe. The com.exe can handle the basic functions but not events and certain methods. I have to work with the idispatch::invoke to solve these things. For basic automation you can work with com.exe. But I recomend Japheth's comview if you want to work with automation.

The reason for starting this thread was my need to learn automation in order to automatic writning of minutes and reports in Word document with data from a database application. So I guess futher development of com.exe will take some time.

As I said before I can't recall you error so you have to describe more exactly what you do when the error occurs.

Best regards
Logged

Minor28
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!