Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

alma

@alma
About
Posts
20
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to set CTabCtrl background color?
    A alma

    Hello! I need to set the background color of all the controls on a dialog. I have problems with a tab control. Does someone know how to do it? -Alma-

    C / C++ / MFC tutorial question

  • CTabCtrl frame background color
    A alma

    Hello! I need to change the background of a tab control. I can change the background of the tab windows, but I don't know how to change the background of the surrounding frame, keeping the lines that give the frame-like look. Does anyone know how to do that? Thanks in advance. -Alma-

    C / C++ / MFC tutorial question

  • com object, [out] params (pointers to values), C#
    A alma

    Yes, that works! Thanks a lot!:) -Alma-

    C# question csharp c++ com

  • com object, [out] params (pointers to values), C#
    A alma

    In the object browser my functions syntax looks this way: HRESULT _stdcall MyGetValue([out] int* value); IntelliSence info looks like this: void MyGetValue(out int value); whatever I put as a parameter it results in an error: The best overloaded method match for 'MYComObjectDllLib.IMyObject.MyFunction(out int)' has some invalid arguments -Alma-

    C# question csharp c++ com

  • com object, [out] params (pointers to values), C#
    A alma

    I have a COM object written in C++. I want to use it from C#. For getting values out of the COM object I used functions like: HRESULT myfunction (/*[out]*/ BSTR* stringvalue, /*[out]*/ int* intvalue); How can I use these functions from c#? -Alma-

    C# question csharp c++ com

  • string to int, double?
    A alma

    How can i convert a string into an int or double in C#? -Alma-

    C# question csharp

  • windows service written in C++, COM objects, call from C#
    A alma

    I have done it in the following way: 1. registered the service: MyService.exe /service 2. added the associated type lib to the project: using MyServiceLib; (I used the Add reference wizard: Solution explorer tab, right click on the solution name, click on Add reference..., click on COM tab, in the appearing list box select the needed type library) 3. Created an object: IMyObject newObject = new MyServiceLib.MyObjectClass(); 4. Called the objects methods: newObject.Function(param1, param2); -Alma-

    C# c++ question csharp com

  • windows service written in C++, COM objects, call from C#
    A alma

    How can I access the functions of a COM object located in a windows service? The windows service was written under Visual C++ 6.0. -Alma-

    C# c++ question csharp com

  • MFC/ATL thread syncronization
    A alma

    Yeah, right! :) Thanks! -Alma-

    C / C++ / MFC c++ question

  • MFC/ATL thread syncronization
    A alma

    What functions/classes should I use for thread syncronization inside a module that is used in both ATL and MFC projects? -Alma-

    C / C++ / MFC c++ question

  • size of physical/virtual memory used by a process - WindowsNT/2000
    A alma

    I found the following solution: DWORD dwProcessID = GetCurrentProcessId(); HANDLE hProcessHandle = OpenProcess( PROCESS_QUERY_INFORMATION, FALSE, dwProcessID); PROCESS_MEMORY_COUNTERS p; GetProcessMemoryInfo(hProcessHandle , &p, sizeof(PROCESS_MEMORY_COUNTERS); logit("Using [PM - %d] [VM - %d]", p.WorkingSetSize, p.PagefileUsage); It needs 'psapi.h' (and 'psapi.lib' if you want to load 'psapi.dll' statically). -Alma-

    C / C++ / MFC question performance

  • size of physical/virtual memory used by a process - WindowsNT/2000
    A alma

    Hello, How can I get the size of physical and virtual memory used by a process? Thanks, Alma

    C / C++ / MFC question performance

  • ATL based COM fire-event client ?
    A alma

    How can I catch a fired COM event in an ATL based NT/win2k service? I have found only examples of clients written in VB or MFC. Alma.

    ATL / WTL / STL c++ question com

  • MIDL compile problem
    A alma

    The 'cause' of the problem was that I switched the regional settings to another than US English. I use win2k sp3, vs6. :)

    COM c++ help csharp visual-studio com

  • MIDL compile problem
    A alma

    I dont know what could happen with my computer, I can not compile COM related projects. I removed visual studio, deleted all the files from 'program files\microsoft visual studio', installed visual c++. But it happens the same thing. Has somebody met this error or similar behavior before? Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oaidl.idl oaidl.idl Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\objidl.idl objidl.idl Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\unknwn.idl unknwn.idl Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\wtypes.idl wtypes.idl Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl ocidl.idl Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\oleidl.idl oleidl.idl Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\servprov.idl servprov.idl Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\urlmon.idl urlmon.idl Processing C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\msxml.idl msxml.idl **C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl(847) : error MIDL2025 : syntax error : expecting a type specification near "CY" C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ocidl.idl(848) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation** Error executing midl.exe.

    COM c++ help csharp visual-studio com

  • Converting TCHAR to BSTR with ATL
    A alma

    Yep, it workes this way. Thanks.

    COM c++ help question

  • Converting TCHAR to BSTR with ATL
    A alma

    It worked, thanx

    COM c++ help question

  • Converting TCHAR to BSTR with ATL
    A alma

    I have to convert a TCHAR string to BSTR in an ATL based service without using MFC. I tried T2OLE, but I could not compile the project because some errors: '_lpa' : undeclared identifier, ... Could anyone help me out? Alma

    COM c++ help question

  • WNetAddConnection2 fails with error code 1312
    A alma

    The solution i found is to use the CreateService function with user and password parameters set. Ex: -------------------------------------------------------------------------------- CString user = _T(".\\User"); CString pswd = _T("pswd"); LPSTR u = user.GetBuffer(user.GetLength()+1); LPSTR p = pswd.GetBuffer(pswd.GetLength()+1); SC_HANDLE hService = ::CreateService( hSCM, m_szServiceName, m_szServiceName, SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, szFilePath, NULL, NULL, _T("RPCSS\0"), u, p); -------------------------------------------------------------------------------- To create the connection: -------------------------------------------------------------------------------- NETRESOURCE nr; char* a = new char[MAX_PATH]; memset(a, 0, MAX_PATH); char* b = new char[MAX_PATH]; memset(b, 0, MAX_PATH); strcpy(a, (char*)"\\\\alma\\geza"); strcpy(b,(char*)"x:"); char pswd[20] = "pswd"; char account[20] = "user"; nr.lpRemoteName = a; nr.lpLocalName = b; nr.lpProvider = NULL; nr.dwType = RESOURCETYPE_DISK; DWORD flags = CONNECT_UPDATE_PROFILE; DWORD res; res = WNetAddConnection2(&nr, (char*)pswd, (char*)account, flags); delete []a; delete []b; if (res == NO_ERROR) return TRUE; else return FALSE;

    C / C++ / MFC c++ database sysadmin help question

  • WNetAddConnection2 fails with error code 1312
    A alma

    Hi! I have a win2000 service written in visual c++ 6.0 that has to access files from a shared folder from the local network neighborhood. The shared folders are password protected, so I have to create a connection to that folder. I tried to use WNetAddConnection2. But WNetAddConnection2 fails and returns the error code no. 1312. I looked it up in the winapi headers, error 1312 is called ERROR_NO_SUCH_LOGON_SESSION, the explanation given is : 'A specified logon session does not exist. It may already have been terminated.'. The list of files/locations is taken from a database, so is dynamically changing over time. Has anybody any idea how could I access files shared on other computers without logging in to the system? Thanks, Alma

    C / C++ / MFC c++ database sysadmin help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups