|
Use the /codebase parameter to regasm (btw the /tlb option is actually /tlb:filename ).
The /codebase option gives you functionality you are used to with regular COM server dlls in that you don't need to know where the server is located for it to work.
James
- out of order -
|
|
|
|
|
Ok that does seem to work. Appreciate it. But why doesn't it just look in the current directory? Kind of odd that it would need the codebase tag.
|
|
|
|
|
It *should* work with it in the build directory. But if I remember correctly when you run the program from within the VB6 IDE you aren't actually running your exe in the build directory. You are running something from within the VB6 program directory.
I don't have VB6 installed anymore so I can't verify this; but it jives with everything I remember.
James
- out of order -
|
|
|
|
|
Well I don't see why it doesn't just *always* look in the current directory for the dll even if you are running a vb6 exe (I did copy the dll to the vb6 build dir). Just doesn't make sense why you would need a static codebase.
|
|
|
|
|
grv575 wrote:
Well I don't see why it doesn't just *always* look in the current directory for the dll even if you are running a vb6 exe (I did copy the dll to the vb6 build dir).
It uses the same loading scheme that the framework uses when it goes to load a .NET assembly. Going from memory this means: Look in the GAC, look in the same directory as the executable, and finally look in the probing directories as specified in the configuration file (by default this is set to "bin\").
Using my current project (a C++ program using a custom .NET assembly via the CCW) as an example.
Test.exe -> C++ program
Managed.dll -> .NET assembly
Run regasm with /codebase on Managed.dll and I can place Test.exe in any directory with or without Managed.dll and it will run.
Run regasm without /codebase (after first /unregistering it). Now Managed.dll must reside in the same directory as Test.exe, but I can run Test.exe from any directory (ie place both in \test\ run from the commandline in \).
If you check out this thread[^] there are some comments about how loading works when using CCW'd components.
James
- out of order -
|
|
|
|
|
Cool, the /unregister tip did the trick. Guess I overlooked that.
|
|
|
|
|
Hi,
I am working with Task Scheduler, which in order to work correctly under XP needs to have a valid username and password in the Run As settings.
Under XP, its possible to have accounts that do not have passwords assigned. So task scheduler will never run, even with a blank password.
I've looked at WindowsIdentity, which works great to obtain the account name, but nothing further to authenticate or look at attributes of the account.
Does anyone know how I can detect whether an account has been assigned a password? And if it hasnt, how I can provide a link to have the user set
a password?
Ingram Leedy
You can't depend on your eyes when your imagination is out of focus.
--Mark Twain
|
|
|
|
|
I'm having trouble trying to access the different colour depths and sizes in an icon. Does anybody know how to load an icon into memory and pull the correct image depending on the system colour depth and users size selection?
I'm trying to provide different icons for disabled users but the imagelist will only hold one size and depth and the class is the same!
Help
|
|
|
|
|
So I have this datagrid in a web user control. The grid has some basic link buttons for functionality like Edit, Add, Update and Cancel. They all work fine when the user control is put on a web page.
I came across a need to have this datagrid repeat with some other information so I put the user control in a datalist. Now only the Edit and Add buttons work. I set some breakpoints, and it looks like any of the buttons located in the grid's EditItemTemplate will not fire their grid events. I set up some events and breakpoints in the datalist as well to see if the events were bubbling up somehow, but they weren't.
When I click on the Update or Cancel link buttons the grid reverts back to EditItemIndex equal to -1 or at least the edit line is going back to the regular ItemTemplate. I set breakpoints everyplace I was setting the grid's EditItemIndex, and again no dice.
Has anybody run into this problem? Anybody figure out a solution?
|
|
|
|
|
How can I protect the MSIL code?
I've seen that Anakrino can convert MSIL code to C# code very easy.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
|
leppie wrote:
Nice! Isnt it?
It's damn nice I can convert others code!
But I don't want others to convert my code! ;P
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
|
Demeanor for .NET scared me:
Demeanor for .NET Enterprise Edition is available now for US$ 1,250 per license
Couldn't you come with something cheaper?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard Andersson wrote:
Couldn't you come with something cheaper?
Sure you could check this out:.Net IL-Obfuscator[^]. I believe they have a free trial and their product purchase price is a lot more reasonable. Here is another if you are still looking:Salamander .NET obfuscator[^].
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Actually, if you're willing to do it, then what you could do is go into ILDASM, export the IL, and then move some of the class members so they're global level members, then rewrite the parts that call them to call them as global.
It makes Anakrino GPF becaue C# doesn't have any concept of global members.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
I need to learn the MSIL first I think, or some part of it!
Can you show me something, how to make a varible global? A tutorial?
Something?
I have Inside C# SE and in the end there is a MSIL reference that I'll read!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
I need some help. I need source code that will recursively search the registry and delete text found. It would need to work on 95/98/NT/XP/2000. I'm looking to return a list (perhaps in a list box) of all keys (ALL TEXT) that were found. If that Text appears anywhere in registry I want it added to my list. Then I can select/deselect what I wish and then delete the selected items. Allow someone to highlight and delete specific ones.
Any ideas?
Any help is appreciated.
Cheers,
Derek
|
|
|
|
|
I have been writing registry editors, searchers, and replacers for some time, so perhaps I could help. However, the core guts of almost all my code is in C or C++. I have tinkered with other languages, but none I have tried have efficient enough string handling to prevent the user from falling asleep.
One catch is the Win95 requirement, which eliminates the .Net languages. Thus, your options are to use strictly C/C++ to target Win95, or exclude Win95 and use .Net (and optionally a managed wrapper around some C++ to get decent performance).
If you can tell me how you wish to proceed, I can explain further.
Cheers
|
|
|
|
|
Yes, I would like some help. I emailed you earlier. Any help you could provide would be great. My primary language is C++. I'd like to have it list the locations and values of where it found the text that I am searching for, and allow me to choose to delete or not delete a certain entry.
Derek
|
|
|
|
|
Sorry for the late reply; I've been rather busy (as if I have lots of spare time
I've looked through my search functions, and can only find the more recent ones, which is fine, but they are very complicated (custom dynamic buffers and arrays, handle a zillion options, search binaries in various formats, some assembler, stored info to avoid recursion overhead, etc.). I am in the process of distilling one down to something digestable and more useful for your purposes. Will post (or email if too large) later today. Just wish I could find some of my regular stuff...
Cheers
|
|
|
|
|
Hello Derek,
I email you the rough code via CP's email system, which complained about the long text, so I hope it made it to you. If not, or it gets mangled, you can email me with an address I can send it to you as an attachment.
I reduced it all down to just a few hundred lines, so it should be pretty manageable. It's strictly search and callback with keypath, entry name, data, data length, data type, and where the string was found. That should be enough to load up a listbox or listview with. RegDeleteValue is easy to call after that.
Let me know if you have any questions.
Cheers
|
|
|
|
|
How can i get the ip or the username of the user in LAN???
sorry again for my english
|
|
|
|
|
System.Environment.Username has the name of the current user, if that's what you're looking for.
|
|
|
|
|
no. what i really wanted was to get a list of the computers in a LAN.sorry for my english who generated this missunderstood.
|
|
|
|