From: Mayayana on 28 May 2010 09:20 You need to narrow it down. It can be lots of things. If you can't find it in code you might try regmon/filemon or procmon to see what happens when the program starts. As an example of how many things might be involved:I had a similar problem once. It turned out that I was running on a PC with no installed printer and my program was trying to enumerate fonts at startup. There was no error of any kind. It just stopped running partway through initialization. | that is exactly my problem: I cannot understand why the app needs it | during runtime and I don't understand why the app doesn't start at all | without any error message. Should it be a Visual Installer problem? I | will try to edit the package using Orca... | | BR | Martin | | Jim Mack schrieb: | > Martin Enke wrote: | >> Dear NG, | >> | >> To use an UDT as parameter in function calls, I code a typelib that | >> contains just this UDT. Works great in the IDE. But when I crate an | >> installation (Visual Installer) and install the App on a differnt | >> PC the program doesn't start, just nothing happens when I dblclick | >> the icon. I found out that this is because I did not provide an | >> register the tlb file. From my understanding, this should not be | >> necessary because the information in the typelib is only used | >> during compile time. Am I wrong? Is there a trick I do not know. | >> Actually I do not want to provide the Typelib for several reasons. | > | > Typelibs are not required for distribution of a compiled EXE. This is | > a compiled VB6 EXE, right? | >
From: Schmidt on 28 May 2010 16:47 "Martin Enke" <m.enke(a)km-enke.de> schrieb im Newsbeitrag news:4bff5b20$0$6981$9b4e6d93(a)newsspool4.arcor-online.net... > that is exactly my problem: I cannot understand why > the app needs it during runtime and I don't understand > why the app doesn't start at all without any error message. What I don't understand yet is, why you're fiddling around with a typelib at all? When you write: "To use an UDT as parameter in function calls, I code a typelib that contains just this UDT" Then I do not really see the purpose of that - you can define UDTs either in *.bas-Modules - as well as in VBs *.cls modules - and then define and pass it within functions just fine. Stuffing and defining a UDT in a typelib does only make sense to me, if you want to interact with *external* (mostly COM-) libs. So, what do we not know (up to this point)...? ;-) Olaf
From: Martin Enke on 15 Jun 2010 03:51 Hi Olaf, .... no, you can not: Of course you can define an UDT in a bas module but you cannot use it as a parameter in functions of class modules. And this is terrible. And yes, when I register the tlb on the target PC the program runs properly. So this proofs the need to be regitered. Best regards Martin Schmidt schrieb: > "Martin Enke" <m.enke(a)km-enke.de> schrieb im Newsbeitrag > news:4bff5b20$0$6981$9b4e6d93(a)newsspool4.arcor-online.net... > >> that is exactly my problem: I cannot understand why >> the app needs it during runtime and I don't understand >> why the app doesn't start at all without any error message. > > What I don't understand yet is, why you're fiddling around > with a typelib at all? > > When you write: > "To use an UDT as parameter in function calls, I code > a typelib that contains just this UDT" > > Then I do not really see the purpose of that - you > can define UDTs either in *.bas-Modules - as well > as in VBs *.cls modules - and then define and pass > it within functions just fine. > > Stuffing and defining a UDT in a typelib does only make > sense to me, if you want to interact with *external* > (mostly COM-) libs. > > So, what do we not know (up to this point)...? ;-) > > Olaf > >
From: ralph on 15 Jun 2010 09:07 On Tue, 15 Jun 2010 09:51:53 +0200, Martin Enke <m.enke(a)km-enke.de> wrote: >Hi Olaf, > >... no, you can not: Of course you can define an UDT in a bas module but >you cannot use it as a parameter in functions of class modules. And this >is terrible. > "Functions" or "Methods"? VB's UDT is a bit of an odd duck. It is provided to mimic Win API 'structs'. It can't not be used in VB class modules primarily because it is not an OLE (or VB native) datatype and there is no type conversion operator to make it one. (There are other ways to describe this phenomena through differences in "Public" and "Private" interfaces, but it amounts to the same thing below the surface.) There are three ways to work with UDTs. 1) You can declare them in a Public basic module And then pass as References or VarPtrs to a block of memory 2) You can declare any "method" that uses one as a Friend eg: Private Type ST_t str As String lng As Long End Type ... Friend Sub SomeMethod( st As ST_t ) ... End Sub 3) You can define them in a Type Library. No matter what method you use - the information is only needed at compile time, since as once a program is compiled this information is incorporated within it. There should never be a reason to re-register this information for a compiled application to run. >And yes, when I register the tlb on the target PC the program runs >properly. So this proofs the need to be regitered. > Since the Type Library is not normally needed for a program to run - it brings us back to Olaf's question ... >> >> So, what do we not know (up to this point)...? ;-) >> You need to provide additional information. -ralph
From: Schmidt on 15 Jun 2010 12:06 "Martin Enke" <m.enke(a)km-enke.de> schrieb im Newsbeitrag news:4c173120$0$6778$9b4e6d93(a)newsspool3.arcor-online.net... > ... no, you can not: Of course you can define an > UDT in a bas module but you cannot use it as a > parameter in functions of class modules. If we talk about Project-Private Classes, then this will work, as soon as you change the Method- attribute of your "Class-Function" to 'Friend'. If we talk about external Classes (hosted in AX- Dlls) - and their Public reachable Methods (from inside of your Main-App) - then it is enough, to define your UDT as a Public Type within one of your Dlls Public Classes - no Typelib needed then. Olaf
First
|
Prev
|
Pages: 1 2 Prev: Problem with Right Context Menu Entry Next: Converting a process to an object |