|
Correct
Thanks,
Perspx
|
|
|
|
|
|
Xcellent Mike, I found at last an article which made my concept clear about COM.So now i think i can go ahead to apply it.Thanks for the valuable help.
Thanks again,
KDevloper.
|
|
|
|
|
ok heres whats wrong i have made an application that uses the rdp ocx all works well connect disconnect etc and screen appears i even set it to connect without entering the user and pass in a text box by tapping
the secure feature of the ocx
i now have one problem thwarting my advance im fairly new to programming and i unerstand it and can use 5 different languages but i am throughly confused as to how i can attach to the ocx or just know if it logged in
i want to do the following
if(rdp.onlogincomplete==true){
txt_log.text_changed blah append text blah;
ai_logic(ip_addy,user_name,pass_word);
// will perform logic for handling accounts
this is going in a published book so any help will be cited and given credit to the person that can help
this tool is going to be released in 2 months it is really a brilliant tool please aid in the design of this tool
}
or just show me how to call an event from the control i dont want it coded for me just some good pointers
i want it to append to this control that it connected succesfully after each time it does this i will call logic i create to keep track as i am writing a tool for security for rdp i will soon release
gpl i just need a little help with hooking the event as there is little or no documentation i can find with working examples
rtfm i know but im ad a roadblock so i could use some pointers
|
|
|
|
|
this is for the person who posted to this i found the even but could use some help on this
Copy Code
VOID OnLoginComplete();
Parameters
None.
Return Value
None.
Remarks
Implement this method in your event sink to receive notification that the control has completed logon.
ok it asks me to call a void function which intern returns no value so how the hell do i hook this thing to let me know it validted to terminal services?
|
|
|
|
|
Hey everybody!
I asked this question in the C# forum, but I guess this forum is the right place...
anyway, I wrote a COM visible C# dll for my application, and everything works great (Thanks to one of code project's articles of course! [Smile] )
I'm using this C# COM from a C++ application (not .Net).
The is in the error handling. Exceptions don't go through from the C# COM to the C++ (like _com_error).
Right now I'm passing a parameter that will store the error, if there is one.
So, What I want to know is, is there is a way to make the exceptions is C# be thrown back to the C++?
Thanks!!!
|
|
|
|
|
Hey gurus
Sorry, I haven't linked to COM from .net yet, so am probably gonna ask a dumb question.
I want to write a tool that links to a system we have here at work to automate some tedious tasks we have to do. The system is all VB6.
Now, I know the assembly that I need to interface with, and have copied that to my laptop (target system doesn't have VS installed on it) and set a reference to it in VS - just so that I can start to write some code and what not.
When I actually come to test it, I want to be sure that my .net app is looking at the correct location of the .dll file on the target system, as there are 3 dll's with the same name all in diffenrent places.
How do I do that - if at all?
(Sorry if this is a dumb ass question, need to get myself a good book, or read a decent tutorial!)
Cheers
|
|
|
|
|
|
Thnks forthe article - intersting reading!
|
|
|
|
|
Hi,
AFAIK native code DLLs are located using the Windows environment variable PATH, which lists several
folders to be looked at in sequence. So the first unmanaged DLL your app needs, will be found in the
first PATH folder that holds a matching name. If that DLL in turn needs another one, I know it is
a bit different, IIRC it will try and look first in the same folder as the calling DLL is.
Also IIRC it used to be common practice to prefix ".;" to the PATH, so the current directory was
always looked at first.
You can have your managed app show all the DLLs it is currently using by executing something like
foreach (ProcessModule module in Process.GetCurrentProcess().Modules) {
Console.WriteLine(module.FileName);
}
which needs a using System.Diagnostics; of course.
|
|
|
|
|
|
hi to all , i have 2 enum on my IDL file :
interface myInterFace
{
typedef enum RPTR_RETRACTBIN_STATUS
{
RPTR_RETRACTBIN_OK,
RPTR_RETRACTBIN_FULL,
RPTR_RETRACTBIN_HIGH,
RPTR_RETRACTBIN_NOT_SUPPORTED,
RPTR_RETRACTBIN_UNKNOWN
}RPtrRetractBinStatus;
...
HRESULT SyncRetract([out,retval] RPtrRetractBinStatus * status);
}
library myLIB
{
typedef enum RPTR_RETRACT_TRESHOLD
{
RPTR_THRESHOLD_RETRACTBIN_FULL,
RPTR_RETRACTBIN_HIGH
}RPtrRetractThreshold;
...
dispinterface _IXFSReceiptPrinterEvents
{
properties :
methods:
HRESULT StackOK(RPtrRetractThreshold reason);
};
...
}
after compile i have this error ::>> redefinition : RPTR_RETRACTBIN_HIGH
what is its solution ?(NOTE : i can not rename any enum members)
modified on Thursday, July 10, 2008 1:35 PM
|
|
|
|
|
The enum keyword specifies an enumerated type.
An enumerated type is a user-defined type consisting of a set of named constants called enumerators. By default, the first enumerator has a value of 0, and each successive enumerator is one larger than the value of the previous one, unless you explicitly specify a value for a particular enumerator. Enumerators needn’t have unique values. The name of each enumerator is treated as a constant and must be unique within the scope where the enum is defined. An enumerator can be promoted to an integer value. However, converting an integer to an enumerator requires an explicit cast, and the results are not defined.
(c) MSDN
With best wishes,
Vita
|
|
|
|
|
Hi guys, I have some serious problems with com+ and the ibm mq series.
I have a windows service with a com+ defined class (inherits ServicedComponent,
has [Transaction(TransactionOption.RequiresNew)] and [AutoComplete(true)] on the
method.
The problem is that the mq series part never rolls back in case of any errors,
the other transactions works perfectly fine.
When it comes to the mq connection, I have set up the enviroment to use server-
bindings (a requirement for using transactions)
MQEnvironment.properties[MQC.TRANSPORT_PROPERTY] = MQC.TRANSPORT_MQSERIES_BINDINGS;
and the connection / send looks like this (stripped):
queueManager = new MQQueueManager(queueManagerName, channel, host);
queueManager.Connect();
...
sendOptions = new MQPutMessageOptions();
sendOptions.Options += MQC.MQRO_NEW_MSG_ID + MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID;
sendOptions.Options += MQC.MQGMO_SYNCPOINT;
...
queue = queueManager.AccessQueue(queueName, MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING);
queue.Put(msg, sendOptions);
queue.Close();
Do I have to do anything in perticular in the transaction-based method for this to work?
Scaled down, it looks lite this:
[AutoComplete(true)]
function void DoWork()
{
try
{
send_message_on_mqqueue();
do_some_db_work();
ContextUtil.SetComplete();
}
catch (Exception)
{
ContextUtil.SetAbort();
}
}
Any help, thoughts or suggestions are appreciated!
|
|
|
|
|
Hi All,
I am building a com dll using vs2005. I have created two events. I have created a client application in VB and built an exe. When I run my application in debug mode, I get an exception in fire events dispatch method, which states "unhandled exception at 0x661068 second.exe: 0xc00000005. Access violation writing location 0x0000050."
In the above error the "second.exe" is the exe name of my vb application.
But when I run the application in vb I get the events is getting fired, some time the application gets crashed. When I put a break point in the fire_event method the application crashes for sure when an event gets fired for the first time.
can any one help in this. And I have another query, does the vc++ through an error like the one I have stated above when we debug the application that contains a breakpoint?
Kindly clarify!
Regards,
LG.
lgatcodeproject
|
|
|
|
|
Maybe the interop file is corrupt so try
1) cleaning the entire solution and running again
2) Deleting the COM dlls references and objects from your vb proyect and putting them again.
JO
|
|
|
|
|
My application fails with "This application has failed to start because the application configuration is incorrect. ..." on other computers.
I know that Microsoft Visual C++ 2008 Redistributable Package or Creating setup.exe helps, but I need another solution.
I want my program to work without installers and packages. What should I change in project properties?
PS:I am working in Visual Studio 2008.
|
|
|
|
|
If you are working with COM you should check if the your custom COM Components dlls are being registered properly.
You could make two scripts to do this, for exmple
Reg.BAT
regsvr32 ProcessLibrary.dll
regsvr32 ProcessLibraryPS.dll
UnReg.Bat
regsvr32 /u ProcessLibrary.dll
regsvr32 /u ProcessLibraryPS.dll
JO
|
|
|
|
|
I use "Standard windows libraries" with "common language runtime support"
As I understand MSDN, I should register msvcm90.dll, msvcp90.dll, msvcr90.dll on computer to run my application. Am I right?
|
|
|
|
|
No,
The dlls you should register in order to use them are the ones of you COM Components (i assumed you were developing COM somponent for the Forum name ).
You could Also check for missing dlls in you installation directory with the dependency walker, this little program checks yor .exe for missing dependencies so you could copy to the instalation dir the files missing (ie: msvcm90.dll, msvcp90.dll, msvcr90.dll )
You could download dependencywalker from:
http://www.dependencywalker.com
JO
|
|
|
|
|
After using dependencywalker I understood that my program requires msvcm90.dll, msvcp90.dll, msvcr90.dll.
I copied them into directory with my .exe file, but it didn't helps. Maybe I should copy them to some system folder&
|
|
|
|
|
|
Just for clarification, this isn't a COM error. It is caused by an Fancy MS feature called Windows Shared Side by side Assemblies (or any other weird name, so apologize). See http://msdn.microsoft.com/en-us/library/aa375996(VS.85).aspx[^]
Never wondered about the C:\WINDOWS\WinSxS directory?
The worst thing you can do is copying the 9.0 dlls to your exe path, or simply registering them in your system directories since this can cause third party applications to fail!!!
The MS way would be redistributing the dlls with their own created merge modules located somewhere in the Studio folder. (I'm too lazy to look up the correct location, if you can't find them PM me ).
So long,
Stefan
|
|
|
|
|
C:\Program Files\Common Files\Merge Modules
Scot Brennecke
Software Developer
VC++ MVP
|
|
|
|
|
Hello Friends,
I am using Windows Vista and I am builing an c++ ATL DLL in Visual C++ 6.0, which is an addin DLL for Windows Mail. (Outlook Express)
When I run my Windows Mail, Vista's DEP (Data Execution Prevention) feature blocks it, and prompts that it blocked for security purpose as some other program tried to use windows mail data.
But I have to hook into Windows Mail as have to put an addin to customize its GUI.
I tried to turn DEP off for Windows Mail, but it didnt allow me (even in Full Admin Account).
Also I turned DEP off for my exe (which loads my addin DLL, which further hooks into Windows Mail), but despite that Windows Mail is blocked.
Also, when I build the project in Visual Studio 2005, it runs very well. (And I have not made any change in the project settings or code)
It seems, VC 6 uses older compilers and VS 2005 uses latest ones so are compatible with Vista!
But I have to use VC 6 only as it's my project's requirement!
Please Help!
Thanks a lot !!
dolly,
N,IN
|
|
|
|