The #include exists, but I get an error: identifier “cout” is undefined. Why?

You need to specify the std:: namespace: std::cout << …. << std::endl;; Alternatively, you can use a using directive: using std::cout; using std::endl; cout << …. << endl; I should add that you should avoid these using directives in headers, since code including these will also have the symbols brought into the global namespace. Restrict … Read more

COM+ object activation in a different partition

Make sure your Com is public and visible. To do this, add these tags to your Com class: [ClassInterface(ClassInterfaceType.AutoDual)] [Guid(“41E90F3E-56C1-4633-81C3-6E8BAC8BDD70”)] [ProgId(“……….”)] [ComVisible(true)] public class MyCom { Make sure your COM has been registered. You can do this using the command line: C:\WINDOWS\Microsoft.Net\Framework\v4.0.30319\regasm “C:\…….\xxx.dll”

Is COM broken in XE2, and how might I work around it?

Workaround rowCnt := UsedRange.Rows.Count; colCnt := UsedRange.Columns.Count; for Row := 1 to rowCnt do begin for Col := 1 to colCnt do begin v := UsedRange.Item[Row, Col].Value; end; end; This also works (and may help you find a workaround in more complicated use cases): function ColCount(const range: ExcelRange): integer; begin Result := range.Columns.Count; end; for … Read more

What does registering a DLL do?

When a DLL is registered, the DllRegisterServer method entry point in your DLL is invoked. Similarly, DllUnregisterServer is invoked when a DLL is unregistered. As described in this MSDN article: Instructs an in-process server to create its registry entries for all classes supported in this server module. If this function fails, the state of the … Read more

BSTR to std::string (std::wstring) and vice versa

BSTR to std::wstring: // given BSTR bs assert(bs != nullptr); std::wstring ws(bs, SysStringLen(bs));   std::wstring to BSTR: // given std::wstring ws assert(!ws.empty()); BSTR bs = SysAllocStringLen(ws.data(), ws.size()); Doc refs: std::basic_string<typename CharT>::basic_string(const CharT*, size_type) std::basic_string<>::empty() const std::basic_string<>::data() const std::basic_string<>::size() const SysStringLen() SysAllocStringLen()

Is there an embeddable Webkit component for Windows / C# development? [closed]

I’ve just release a pre-alpha version of CefSharp my .Net bindings for the Chromium Embedded Framework. Check it out and give me your thoughts: https://github.com/chillitom/CefSharp (binary libs and example available in the downloads page) update: Released a new version, includes the ability to bind C# objects into the DOM and more. update 2: no-longer alpha, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)