Can any one tell me what is the mistake i have did in below line of code? int iPrimaryLang[4]={LANG_ENGLISH, LANG_BENGALI, LANG_ORIYA, LANG_HINDI}; I am getting compiler error C2059, C2334. Regards, lg
lgatcodeproject
Can any one tell me what is the mistake i have did in below line of code? int iPrimaryLang[4]={LANG_ENGLISH, LANG_BENGALI, LANG_ORIYA, LANG_HINDI}; I am getting compiler error C2059, C2334. Regards, lg
lgatcodeproject
Hi Good Morning to Every One here! I being a VC++ Developer does't have much exposure to WebDeveloping Technology. I would like to know What's WSDL is all about! Why its needed? What difference does it make, if we are not going use this technology/approach? Regards, LG.
lgatcodeproject
Thanks for explaining with patience. Have a nice day. Bye. ReEgards, :) LG
lgatcodeproject
Thanks saurabh, your anwer added more clarity. So when I say ActiveX Dll it means I need both the functionality of COM and Dll as well. Hope I am getting it all correctly! Regards, LG.
lgatcodeproject
So, when you import any dll into an ActiveXControl you can call it as ActiceXDll, am I correct? In VC++6.0 New->Project, one can find many projects, where in there is **"MFC AppWizard (dll)"**and another project called "ATL COM AppWizard"->Dll/Service(Exe)/Executable(exe); can you tell me what is the difference between these two projectS? when would one choose these? I had the lead to my initial question from the above option? Regards, LG.
lgatcodeproject
Hi saurabh, Thanks for the response. can you explain what is the difference between the dll and activex dll. With respect to you answer may be I would put it this way, how does a dll differ when its purpose is to serve an ActiceX Object? Regards, LG.
lgatcodeproject
Hi All, I have referred a term "ActivexDll" I think there exist a concept called ActiveDll, if I am wrong then kindly excuse me and clarify "Difference between a Dll and ActiveX Components ". If I am correct then can any one explain me the difference between a Dll and an ActicexDll. Regards, LG. :)
lgatcodeproject
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
Hello Vinay, Thanks, it solved my purpose. Can we configure some other items (other than those provided in the dropdown)to this status strip in runtime? Regars, :) LG.
lgatcodeproject
Hi Everyone, I have a statusstrip control on my form and how do I show some text on it. I tried the text property but nothing is visible on the form. kindly help. I know this question may sound silly to some but then I am just a beginner :) :rolleyes: Regards, LG
lgatcodeproject
Hi Simon, The COM component(named ActiveXRAP) I have referred in my project(ActiveXRAPLib) is displayed as namespace. namespace RAPClient { public partial class Form1 : Form { string output; /* this is the library exposed as namespace and it contains a class RAPCLientX where in there is a method Connect(..). Now declaring the below way is showing an error that states ActiveX... is used as a type since its a namespace. kindly help me out. */ **ActiveXRAPLib.RAPClientX objRAP;** public Form1() { InitializeComponent(); } private void bConnect_Click(object sender, EventArgs e) { } } }
Regards, LG.
lgatcodeproject
Hi EveryOne, I am writing a windows application that Refers a COM component which exposes a single function called Connect(). I have referenced COM Component but I don't know how to call this function on a button click. In VB we create a variable and then set an instance of the class object to the varibale, finally browsing this variable with a dot operator would reveal the methods exposed by the class. How do we achieve the same in C#? I am new to C# so kindly excuse me if this is very basic and I am wasting your valuable time. Thanks. Regards, LG.
lgatcodeproject
So guess its toooo much of Memory Recall hapenning today hmmm :) Regards, LG.
lgatcodeproject
Cedric Once I posted this question, I got the question which u asked; in my mind and then included the library (which I missed out earlier :( )WS2_32.LIB. So I fixed it in the time you answered the question. sorry for wasting your time Cedric and thanks for the reply. Regards, LG. :)
lgatcodeproject
Hi EveryOne, In ActivexDLL I have written a method called Connect(..)inside a class. The method exposes the functionality of connecting to another system using sockets. The problem here is when I compile my project I am getting link errors(unresolved external symbol). These errors are thrown when winsocks methods are called like htos(),inet_addr(),connect() are called. Unresolved symbol (upto my knowledge) are thrown when the function definition is unknown or its different from the one that is implemented. since I am using an inbuild function (used the header file winsock2.h) what might be the cause to the problem? How would I Overcome it. Please find the code below. STDMETHODIMP CRAPClientX::Connect(BSTR serverIP, BSTR serverPort,BSTR *output) { // TODO: Add your implementation code here /**output=SysAllocString(L"Connected"); return S_OK;*/ //---------------------- // Initialize Winsock WSADATA wsaData; char returnString[150]; int iResult = WSAStartup(MAKEWORD(2,2), &wsaData); if (iResult != NO_ERROR) printf("Error at WSAStartup()\n"); //---------------------- // Create a SOCKET for connecting to server SOCKET ConnectSocket; ConnectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (ConnectSocket == INVALID_SOCKET) { sprintf(returnString,"Error at socket(): %ld\n", WSAGetLastError()); *output=SysAllocString(_bstr_t(returnString)); WSACleanup(); return S_OK; } //---------------------- // The sockaddr_in structure specifies the address family, // IP address, and port of the server to be connected to. sockaddr_in clientService; clientService.sin_family = AF_INET; clientService.sin_addr.s_addr = **inet_addr("127.0.0.1" )**; clientService.sin_port = **htons( 27015 )**; //---------------------- // Connect to server. if ( **connect(ConnectSocket, (SOCKADDR*) &clientService, sizeof(clientService) ) == SOCKET_ERROR)** { sprintf( returnString,"Failed to connect.\n" ); *output=SysAllocString(_bstr_t(returnString)); WSACleanup(); return S_OK; } sprintf(returnString,"Connected to server.\n"); *output=SysAllocString(_bstr_t(returnString)); WSACleanup(); return S_OK; }
kinldy reply. Regards, LG.:confused:
lgatcodeproject
Hi, Thanks its working now but then I have a doubt, what is that L do inside SysAllocString()function. Regards, LG.
lgatcodeproject
Hi, Even if I use the BSTR type while copying a string constant using strcpy with a type cast the application crashes. How to copy a string constant by-passing this problem? Please find the below snippet. STDMETHODIMP CRAPClientX::Connect(BSTR serverIP, BSTR serverPort,BSTR output) { // TODO: Add your implementation code here **strcpy((char *)output, "connected");** return S_OK; }
Regards, LG.
lgatcodeproject
Hi EveryOne, I have added a class which contains a method that accepts a VARIANT type variable in an ActivexDll written in VC++. In one of sample code I found the a value is assigned to the VARIANT type variable using a SAFEARRAY. My question is how can a string value be assigned to VARIANT type variable(type casting in strcpy does't work). Can we achieve it only by using SAFEARRAY? if yes why is it so? Is there any other way to obtain the same? kindly explain. Thank you. Regards, LG.
lgatcodeproject
Thanks for the concern. Regards, LG
lgatcodeproject
Thanks for the reply. If my client is in C sharp that what types I am supossed to use? Regards, LG
lgatcodeproject