interop

WCF Serialization problems with WSDL file created by Java tools

对着背影说爱祢 提交于 2020-01-22 10:56:28
问题 My team is tasked with getting several in-house developed .NET client applications to connect to some new Java web services. The Java web service is a third party, vendor supplied WSDL file that our team has a limited ability to modify/control...meaning we probably have the power to request our vendor to make slight tweaks to the WSDL, but major changes would probably be either unfeasible or difficult to request. That said, we are attempting to utilize WCF/.NET 4.0 to generate the .NET proxy

Connect to Outlook calendar from C# using Interop

早过忘川 提交于 2020-01-22 02:35:07
问题 Ok I am trying to connect to an Outlook calendar from C# using the following code: using Outlook = Microsoft.Office.Interop.Outlook; Outlook.Application msOutlook = new Outlook.Application(); Outlook.NameSpace ns = msOutlook.GetNamespace("MAPI"); Outlook.MAPIFolder folder = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar); foreach (Outlook.MAPIFolder subfolder in folder.Folders) { MessageBox.Show(subfolder.Name); } However, despite having two Calendars, the piece of code above

different charset for multiple params with dllimport

依然范特西╮ 提交于 2020-01-21 15:25:48
问题 Is it possible to declare different charset options for seperate params? heres what i mean: [dllimport("my.dll", charset = charset.Ansi)] void myfunc(string CharPtrInCPP, StringBuilder WCharPtrInCPP); the problem is the c++ function takes a char* for the filename and a wchar* for the data recieved back... in c++: void myfuncImpl(char *filename, WCHAR *buffer, int len); //another method, myfunc, wraps this 回答1: As already pointed out, you should be able to specify MarshalAs for each parameter.

different charset for multiple params with dllimport

a 夏天 提交于 2020-01-21 15:24:48
问题 Is it possible to declare different charset options for seperate params? heres what i mean: [dllimport("my.dll", charset = charset.Ansi)] void myfunc(string CharPtrInCPP, StringBuilder WCharPtrInCPP); the problem is the c++ function takes a char* for the filename and a wchar* for the data recieved back... in c++: void myfuncImpl(char *filename, WCHAR *buffer, int len); //another method, myfunc, wraps this 回答1: As already pointed out, you should be able to specify MarshalAs for each parameter.

80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE))

五迷三道 提交于 2020-01-21 14:40:51
问题 Retrieving the COM class factory for component with CLSID {0A80A563-28AE-11D3-9CD6-00C04F8B8EF1} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)) I've Searched for the entry in Registry I can Find Assembly with {0A80A563-28AE-11D3-9CD6-00C04F8B8EF1} at HKLM\Software\Classes\Wow6432Node\CLSID{0A80A563-28AE-11D3-9CD6-00C04F8B8EF1}\InProcServer32 I've Created Application By using embedded

How to get all memory address space used by a process?

三世轮回 提交于 2020-01-21 07:21:04
问题 I need to know all memory address space used by a process. The memory space will later be scanned to locate values within the process and identify their locations / addresses. My current process for this is to take each module's base address through its (base address + memory size). I'm testing this on a process with a known value at a known address. When I look up that specific address, I get the value I expect. However, when I scan (what I believe to be) all address space used by the

IronRuby: Cannot call method on a COM Object with one or more arguments

雨燕双飞 提交于 2020-01-17 03:34:27
问题 When I try and call any method on a COM Object that takes one or more arguments, I get the following error on the last argument: Could not convert argument 0 for call to Open. (ArgumentError) Everything works fine when calling a method that takes no arguments, or getting/setting a property. Here is the code that gives me the error above: def new_com_object(prog_id) System::Activator.CreateInstance(System::Type.GetTypeFromProgID(prog_id)) end xls = new_com_object('Excel.Application') xls

Non-Latin characters in username for FTP

风格不统一 提交于 2020-01-16 11:19:27
问题 I tried to find the list of characters allowed in username for FTP but the RFC is not very specific. What ftp servers and clients support user names in Unicode? Special characters? Is there a generally accepted spec that explains the list of characters allowed in FTP usernames? (googling was of no help to me) 回答1: RFC 959 5.3.2: <username> ::= <string> <string> ::= <char> | <char><string> <char> ::= any of the 128 ASCII characters except <CR> and <LF> Later RFCs (like proposed standard RFC

Error: Retriving the COM class factory for component with CLSID failed due to following error : 80040154

佐手、 提交于 2020-01-16 09:34:31
问题 I have a c# winforms application which i use to send audio out form a camera, which uses third party dll for connecting to device and sending audio out to device. when i run my application on my local machine then everything runs fine without any problem. Problem: But when i copy my application onto another machine and run it i getting this error Unable to send audio to this device. Error: Retriving the COM class factory for component with CLSID failed due to following error : 80040154

Calling C# From Unmanaged C++ Passing Or Returning “Complex” Types

做~自己de王妃 提交于 2020-01-16 05:02:59
问题 I'm after help on how to use complex objects either as return values or passed as parameters to C# class methods exposed to unmanaged C++ as COM components Here's why: I'm working on a project where we have half a dozen unmanaged C++ applications that each directly access the same Microsoft SQL Server database. We want to be able to use MS-Sql/Oracle/MySql with minimum changes and we've decided to implement a business logic plus data layer exposed via WCF services to get the required