|
Are you asking for technology to prefer in this scenario ? If yes, then opt for web services.
|
|
|
|
|
yah i want to know the technology? can you send any basic tutorial for web services.Right now i know only vc++,i didn't know vc++ .net. So, please explain that should be know the .net technology while creating web service oriented application?
|
|
|
|
|
Start with this[^] article.
|
|
|
|
|
I am working on ATL DLL project. I added some classes and properties and also some classes have attributes whose type are another class. I mean in class Student there is another class' instance named Course.
When I generate DLL and access it within C# as below, I get an exception in 3rd line.
...
student.Course.Name = "CS 100";
student.Course.Name = "CS 100";
student.Course.Name = "CS 100"; //AccessViolationException
student.Course.Name = "CS 100";
...
There is no difference whether to set the same attribute or not. The code returns "System.AccessViolationException was unhandled. Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
But with the below code there is no problem. It works fine
MyDLLLibs.Course c = new MyDLLLibs.Course();
c = student.Course;
c.Name = "CS 100";
c.Name = "CS 100";
c.Name = "CS 100";
c.Name = "CS 100";
Also I want to create a Collection using std::list to send/receive list of objects to/from DLL. For example Department class has a list named Students which is another class contains Student objects. In Students class there is Add, Remove methods and Item and Count attributes. When adding elements to the Students object as shown in below code, it returns FatalExecutionEngineError at 3rd access to Students "again".
MyDLLLibs.Department d = new MyDLLLibs.Department();
MyDLLLibs.Student s1 = new MyDLLLibs.Student();
s1.Name = "Xelon";
s1.Surname = "XYZT";
...
d.Students.Add(s1);
d.Students.Add(s2);
d.Students.Add(s3); //FatalExecutionEngineError
d.Students.Add(s4);
I can't find what is the problem. Is this an initialization or memory allocation problem?
Thanks for your help
|
|
|
|
|
I have more of a design type of question.
Can anyone tell me if it is possible to :
I have a win 32 dll and a C# web service. Instead of creating a c# client, i would like to use my win 32 dll as the client. I use this dll for other things that are all file related. Is it possible for me to make the dll the client and to be able to call the c# web service and send and receive data from it? If so, does anyone have any examples of how to turn an already existing win 32 dll into a client accessing a c# web service?
|
|
|
|
|
I just replied to this in the Visual C++ forum. Please don't cross post.
led mike
|
|
|
|
|
I AM HAVING A PICULIAR PROBLEM REGARDING THE SOFTWARE COMPATABLITY WITH REFRENCE TO WIN2000 & WINXP . THE ARITHMATIC FUNCTIONS OF SUM,MEAN,MAX,MIN,STANDARD DEVIATION ARE WORKING FINE IN WIN2000 BUT ARE SHOWING SOME DATAS WRONG & SOME NULL IN XP .PLEASE SUGGEST ME SOME STEPS TO SOLVE THE ABOVE PROBLEMS.
THANKS & REGARDS,
SATYABATA NAIK
SATYABRAT NAIK
|
|
|
|
|
Hi guys,
just a quick question with printing in VB.Net. I have managed to print a form by making an image and using the BitBlt API, though I have been unsuccessful in getting the entire form if it scrolls past the size of a form.
Could someone please point me in the right direction?
Thanks in advance,
Daniel
-- modified at 1:48 Tuesday 13th March, 2007
Found a control that does what I want, though it needs a little tweaking for my purposes. I hope this also helps others looking for a similar solution:
http://www.codeproject.com/csharp/ControlPrint.asp[^]
|
|
|
|
|
Hi,
I'm creating a DLL and there is a code listing below that gets and puts an array of characters named minput. When I send English characters to the put function, there is no problem. I can get back the correct characters with get function. But when I send non-English characters (like Turkish characters ı,ç,ö,ş,ğ,ü), the function returns some strange characters.
Is there any idea why this is happening?
Thanks
PS: The project's character set is set to "Use Unicode Character Set" as default.
//Input.h
...
public:
char minput[100];
public:
STDMETHOD(get_m_input)(BSTR* pVal);
public:
STDMETHOD(put_m_input)(BSTR newVal);
...
//Input.cpp
...
STDMETHODIMP CInput::get_m_input(BSTR* pVal)
{
// TODO: Add your implementation code here
CComBSTR bstStr(this->minput);
*pVal=bstStr.Detach();
return S_OK;
}
STDMETHODIMP CInput::put_m_input(BSTR newVal)
{
// TODO: Add your implementation code here
::wcstombs(this->minput,newVal,99);
return S_OK;
}
...
|
|
|
|
|
xelontr wrote: char minput[100];
Modify this to, TCHAR minput[100]; . And make you application UNICODE enabled.
|
|
|
|
|
I changed type of the array to TCHAR and changed the put function's wcstombs to
_stprintf(minput, _T("%s"), (LPCTSTR) newVal);
and it worked. Is there any other (easy) way to change the BSTR to TCHAR? Or is this the best one?
Thanks again
|
|
|
|
|
xelontr wrote: Is there any other (easy) way to change the BSTR to TCHAR?
Consider using ConvertBSTRToString .
And does using TCHAR solved your problem ?
|
|
|
|
|
Yes, TCHAR solved the problem. Now the functions work properly.
But I can't use ConvertBSTRToString. It gives "cannot convert from 'char *' to 'TCHAR [100]'" error.
Thanks
|
|
|
|
|
xelontr wrote: ConvertBSTRToString. It gives "cannot convert from 'char *' to 'TCHAR [100]'" error.
ConvertBSTRToString returns char* , where as TCHAR is defined as wchar_t in case for UNICODE and char otherwise.
So use appropriate conversion function.
|
|
|
|
|
Hi all,
Can anyone explain to me why when IE7 is shut down my control's destructor is not called?
Thanks
Tom
I'm using: VS.NET 2003, XP SP1, ATL, IE7
Philosophy: The art of never getting beyond the concept of life.
|
|
|
|
|
What type of control it is ? I mean is it BHO ?
I remmember similar porblem(not in IE), when in client I forgot to release control.
|
|
|
|
|
Hi Prasad, thanks for the response.
My control is a windowless ActiveX control embedded in a web page.
Tom
Philosophy: The art of never getting beyond the concept of life.
|
|
|
|
|
Haven't used control anytime that way.
But, just a guess, if you needed to access control interface, then have you released it ?
|
|
|
|
|
I'll have to look into that. There might be something wrong at the core. It's an old control, not originally created by me.
Philosophy: The art of never getting beyond the concept of life.
|
|
|
|
|
Yes, it seems , control is never released.
|
|
|
|
|
Thanks I'll post if I find any thing useful.
Tom
Philosophy: The art of never getting beyond the concept of life.
|
|
|
|
|
We are creating a instance of Internet Explorer with CoCreateInstance,of type CLSCTX_LOCAL_SERVER.
Though the IE instance is successfully created ,it picks up the process id of an existing prior opened IE instance.
Is this behaviour inherent to IE?
Is ther any way to create a IE instance with its own specific process id.
|
|
|
|
|
my question is simply :
ATL with wxWidgets ,is it possible????
when i tried to use the problem is
"wxmsw28d_core.lib(paper.obj) : error LNK2001: unresolved external symbol __imp__calloc"
"wxProject.dll - 1994 error(s), 0 warning(s)"
|
|
|
|
|
Ok. I think I want to create two web services in the same ATL server dll. But I want them to be able to work on the same session. Using ISessionStateService, ISession and attributed ATL ISAPI.
I got "session state keeping" to work for the same web service. But how to make the second one to be able to find the session and retrieve variable stored by the first?
Help!
Thanks a lot!
Maksim.
"personal world record"
|
|
|
|
|
Anyone know why the .push_back function for a vector would overwrite the last entry. So for example, if i push 10 items into the vector. When i am done, the vector size shows 10 but the only item in there is the last one. I am totally clueless on this.
I call this function in a dll:
DLL_API int GetDATA(std::vector<datainforecname*>& pVectorDataInfoRecName, std::string sPath )
Then i process a DataInfoRecName pointer.
_tcscpy( pDataInfoRecName->szDate, TempString.c_str ());
Then i push it into the vector
pVectorDataInfoRecName.push_back(pDataInfoRecName);
|
|
|
|