|
Brandon T. H. wrote: It would also help if it was a few short lines of code or short as possible (if applicable).
In a Microsoft product? But seriously, there are lots of links to .NET encryption around, including .NET Encryption Simplified[^] in the CodeProject Articles section.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Thanks a bunch. 
|
|
|
|
|
Hi,
I want to load and use two different versions of same dll in my project. only solution i could think of is to use same dll with different namespace, but I cannot change the dll since its third party. so i am stuck here...is it even possible? if yes then how?
Not sure if this is the right forum, since i want to achieve this in vb.net application so posted here. any kind of help is appreciated!
Regards,
Affan Toor
|
|
|
|
|
Are these COM-based, normal library or .NET .DLL's??
|
|
|
|
|
Thanks for reply.
these are .NET DLLs. basically our organization are shifting from an older version of third party API to its latest version. and we want to make this transition smooth, we want to use both for a while and gradually replace the functionality from older version to new version.
Regards,
Affan Ahmad Toor
|
|
|
|
|
why you want this? i've a generic solution, but will be very painstaking... so, depending on why you want that, we can delivery a simple solution...
|
|
|
|
|
thanks for reply.
our organization are shifting from an older version of third party API to its latest version. and we want to make this transition smooth, we want to use both for a while and gradually replace the functionality from older version to new version. if you have any alternative solution then please share.
Regards,
Affan Ahmad Toor
|
|
|
|
|
i don't know if this will work on VB, but i've found this workaround:
http://blogs.msdn.com/b/abhinaba/archive/2005/11/30/498278.aspx[^]
also, this post from stackOverflow can be useful: http://stackoverflow.com/questions/5916855/using-multiple-versions-of-the-same-dll[^]
also, i've found that in SharpDevelop you could simple select the reference in the solution explorer, click properties and set a alias, this works for VB and C#, i can't verify that this is true for visual studio (i don't have it here), but its a good start point
if nothing works, the solution is to create 2 more class library projects and warp each version in a diferent namespace... too much work
EDIT: i haven't managed to reference the alias defined in SharpDevelop into the code, so, i think you will be forced to warp the dlls...
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
That is what the Reflection namespace is for in .Net. You'll have to load the dll's dynamically. I don't think it is worth it though.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hey All,
So I am currently attempting to wrap my head around create multi-threaded programs and I am currently running into an issue when using a Shared variable across multiple threads.
The program is structured as follows:
Public Shared IsActive as Boolean
Main Thread = GUI
Sets the Value of IsActive through a Button Control
Two Worker Threads
Both threads are while loops that read the IsActive Boolean
Ex:
While IsActive = True
Do Work
End While
However when I change the value of IsActive from the Main Thread it causes the worker threads to stop (ThreadState = 16).
I have been reading that I have to synchronize/lock shared resources and have tried SyncLock and Monitor methods without success (it is entirely possible I am not using the above correctly, so If someone could provide proper examples for the above situation using the mentioned methods please share them).
Thanks a bunch for any and all help, much appreciated!
If further code is needed let me know.
Thanks!
|
|
|
|
|
If I read your post correctly, you declare a variable in your UI code (isActive) and set it to True. Then you start two threads that both look at isActive and run until isActive if False. When you set isActive to False, both threads stop.
This is the expected behavior. Or am I missing something? What are you expecting to happen?
|
|
|
|
|
See, that is what you get from a poor choice of an identifier name, what you have implemented is a "PleaseContinue" flag: as soon as you set it false, the worker threads have nothing left to do, and terminate.
If OTOH you want a "TemporarilySuspended" flag (I switched polarity here!), something you could set true and false repetitively and your worker threads would obey, then you need your worker threads to wait for it to become true again. An AutoResetEvent may be a good choice then.
Anyway, IsActive is a bad name, as it does not describe a state, it is intended to give a command.
|
|
|
|
|
Yes correct, in my initial post I realize that the threads were behaving exactly as they should and just ended when the variable broke the workers out of the Wloop.
Basically, I want the two workers threads to constantly be running, and then when the shared variable is set to true they then start doing work. Then when the user clicks the button again the worker threads "pause" and wait for the next time the variable is set to True.
The "IsActive" name was just an abstraction. I use a much more detailed name in my actual code.
In regard to the "TemporarilySuspended" flag and AutoResetEvent, could you provide some examples, would love to handle that properly.
Thanks a bunch for the help!!
|
|
|
|
|
I suggest you start by reading MSDN on the subject of AutoResetEvent class, the examples are adequate IMO.
|
|
|
|
|
how to cut a receipt using vb6?
|
|
|
|
|
VB6 is no longer supported by Microsoft and therefore there are very few support resources. You need to rewrite the app into a supported language.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm may throw up because I'm supporting a V6 user, but you have to dig out the manual on the printer and get the character sequence to send to the printer to tell it to cut the receipt. Then you modify your code to send that character sequence when your receipt printing code is done.
|
|
|
|
|
Can anyone give me a sample data model of a flight reservation?
|
|
|
|
|
Why? Asking questions about YOUR code would be a bit more productive than copy'n'pasting someone elses code.
That's not something you're going to come acrossed in the public domain. Usually something like that is going to be a part of a VERY expensive piece of software.
|
|
|
|
|
|
Hi I use wiaaut.dll to scan, but in some PC it's not work because it not register in PC. How I register this dll programatically and only one time?
|
|
|
|
|
You don't do it from your app code. This is a problem that's easily solved at install-time. Create an installer for your app, add the .DLL to it and the installer will register it for you.
|
|
|
|
|
I use Smart Install Maker, are this installer make this? Are this dll is ActiveX, because in this installer have a ActiveX section
modified 11-Mar-12 11:10am.
|
|
|
|
|
Never heard of it. I have no idea.
.NET cannot target building a true ActiveX component. You've built a COM-exposed library. I have no idea if Smart Install Maker handles .NET assemblies properly and regsiters them. You'll have to contact the people that make Smart Install Maker for that.
|
|
|
|
|
Yes Smart Install Maker register Wiaaut.dll and it work perfect . THANKS
|
|
|
|