How can you obtain the Type (the name as a string is sufficient) of an Object in VB6 at runtime?
i.e. something like:
If Typeof(foobar) = "CommandButton" Then ...
/EDIT: to clarify, I need to check on Dynamically Typed objects. An example:
Dim y As Object
Set y = CreateObject("SomeType")
Debug.Print( <The type name of> y)
Where...
I have a third party library that internally constructs and uses the SqlConnection class. I can inherit from the class, but it has a ton of overloads, and so far I have been unable to find the right one. What I'd like is to tack on a parameter to the connection string being used.
Is there a way for me to put a breakpoint in the .NET lib...
I am looking for attributes I can use to ensure the best runtime performance for my .Net application by giving hints to the loader, JIT compiler or ngen.
For example we have DebuggableAttribute which should be set to not debug and not disable optimization for optimal performance.
[Debuggable(false, false)]
Are there any others I shou...
I'm trying to evaluate .net as an implementation platform for my next software project.
Which operating system releases come with a .net runtime pre-installed? And which come with it as an add on (I'm thinking mono here)?
...
I have multiple classes that all derive from a base class, now some of the derived classes will not be compiled depending on the platform. I have a class that allows me to return an object of the base class, however now all the names of the derived classes have been hard coded.
Is there a way to determine what classes have been compiled...
Hi,
How do I get my project's runtime dependencies copied into the target/lib folder?
As it is right now, after 'mvn clean install' the target folder contains only my project's jar, but none of the runtime depencies.
Thanks,
Michael
...
When an error occurs in a function, I'd like to know the sequence of events that lead up to it, especially when that function is called from a dozen different places. Is there any way to retrieve the call stack in VB6, or do I have to do it the hard way (e.g., log entries in every function and error handler, etc.)?
...
Let say we defined an interface for tax service as ITaxService, and we got more than one implementation of TaxService (by region) however I wanted to attach a specific tax implementation to a specific customer from the spcific region.
Will DI help in this scenario? How? "code snippet would be much appreciate"
...
I have the problem, to get a failed run-time check in Visual C++ 2008 because of casting a too big number to a smaller type. The failure is in an external dll, so I can not fix it there. So how can I switch off this run time check for an external project.
...
We recently had a problem where, after a series of commits had occurred, a backend process failed to run. Now, we were good little boys and girls and ran rake test after every check-in but due to some oddities in Rails' library loading, it only occurred when you ran it directly from mongrel in production mode.
Tracked the bug down and i...
I'm trying to create a c++ library for use on windows/MSVC.
My problem is that it seems that in order to link properly, I need to distribute a bunch of different versions, linked against different versions of MSVC's c++ runtimes - single and multi-threaded, debug and release, different compiler versions, various other security and other...
Hi,
I was asked to build a java system that will have the ability to load new code (expantions) while running.
How do I re-load a jar file while my code is running? or how do I load a new jar?
Obviously, since constant up-time is important, I'd like to add the ability to re-load existing classes while at it (if it does not complicate ...
Ryan Delucchi asked here in comment #3 to Tom Hawtin's answer:
why is Class.newInstance() "evil"?
this in response to the code sample:
// Avoid Class.newInstance, for it is evil.
Constructor<? extends Runnable> ctor = runClass.getConstructor();
Runnable doRun = ctor.newInstance();
so, why is it Evil?
...
in Config.groovy I see this:
// set per-environment serverURL stem for creating absolute links
environments {
production {
grails.serverURL = "http://www.changeme.com"
}
}
what is the correct way to access that at runtime?
...
Hi
How can i generate bytecode (Byte[]) from a String at runtime, without using a "javac" process or something of this sort? is there a simple way of calling the compiler like that?
later addition:
I chose to accept the solution that actually best fits my situation. my application is a hobby-project still in design sketch phase, and i...
There are two scenarios I need to clarify:
An executable compiled with .NET 3.5 needs to use a library compiled with .NET 1.1 and the library must run on the 1.1 runtime.
An executable compiled with .NET 1.1 needs to use a library compiled with .NET 3.5.
I cannot find a reliable source stating that it is not possible to load two vers...
During execution, how can a java program tell how much memory it is using?
I don't care how efficient it is!
...
I would like to change the "Row Source" values in an Access table through code.
This way I can filter what a user can choose in a column's combo box.
...
Hi,
We need to generate LINQ queries which are 100% unknown during coding (design time). This is because the logic is available in our framework which is 100% separated from any data projects. For data we use LLBLGen generated data access code.
Normally by using invokes on the DLL, which we specify to the framework (not reference) we c...
I launch a child process in Java as follows:
final String[] cmd = {"<childProcessName>"};
Process process = Runtime.getRuntime().exec(cmd);
It now runs in the background. All good and fine.
If my program now crashes (it is still in dev :-)) the child process still seems to hang around. How can I make it automatically end when the pa...