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
P

platso_588

@platso_588
About
Posts
19
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to delete Registry Key with Maximum rights
    P platso_588

    I checked my Administrator has Full right Access. But Still i could not delete the registry Key that i Mentioned.

    C / C++ / MFC help c++ windows-admin tutorial

  • How to delete Registry Key with Maximum rights
    P platso_588

    Thank you. I tried this option aswell, I could able to Delete keys under HKLM\Software\ but could not able to delete the key that i mentioned. I think i need to get access rights beyond Administrator rights inorder to delete the Registry enrty that i mentioned.

    C / C++ / MFC help c++ windows-admin tutorial

  • How to delete Registry Key with Maximum rights
    P platso_588

    Hello,
    I like to delete the key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_HTTP\0000' programatically in C++. I get Error 5 which is Access Denied. I tried calling ACL functions but i could not succeed. Can any one help me by giving code snipped through which i can delete the above mentioned Registry Key.

    C / C++ / MFC help c++ windows-admin tutorial

  • deleting folder containting files
    P platso_588

    I like to Delete folder in any case even if other applications or other users are accessing the same folder. Forcefully i like to delete the Folder. I receive Error 32 when the function SHFileOperation(). Can any one tell me how can i acheive this.

    C / C++ / MFC question json

  • Delete folder MFC code
    P platso_588

    I like to Delete folder in any case even if other applications or other users are accessing the same folder. Forcefully i like to delete the Folder. I receive Error 32 when the function SHFileOperation(). Can any one tell me how can i acheive this.

    C / C++ / MFC

  • Update Windows Service member variable from external windows Application in c# [modified]
    P platso_588

    Thankyou Covean, With this approach i implemented and is working. The Link http://www.codeproject.com/KB/dotnet/WindowsServices.aspx is helpful. Thanks, Prasad

    C# csharp tutorial announcement

  • Update Windows Service member variable from external windows Application in c# [modified]
    P platso_588

    Thank you for your response. If we develop a windows service in VC++ we can add an "Interface" and can add "Method" to it. This method can be exported to outside applications. This Method can be used by external applications by calling CoCreateInstance() and can get the pointer to the interface and this pointer can call the function. I just like to have similar Implementation but both the Windows Service and Windows Application need to be implemented in c#. Prasad

    C# csharp tutorial announcement

  • Update Windows Service member variable from external windows Application in c# [modified]
    P platso_588

    Hello, Can any one tell me how to update the member variable of my windows service from another windows Application. I just need to update a flag variable from external windows application. I want to implement this in c#. The Windows service is already made. Just need to set the flag. This flag is needed to control the launch of another windows application from this running windows service.

    modified on Monday, November 16, 2009 3:52 AM

    C# csharp tutorial announcement

  • Issue Launching UI Application from windows service in c# Windows
    P platso_588

    Thank you Covean, Sorry,I could not completely Implement the suggestion given by you. Here is what i implemented. PROCESS_INFORMATION pi; STARTUPINFO si =new STARTUPINFO(); System.IntPtr hToken; string commandLine, userPart, domainPart, password, lpCurrentDirectory; // Initialize structs si.cb = Marshal.SizeOf(si); userPart = "Prasad"; password = "pass"; domainPart = ""; commandLine = ""; lpCurrentDirectory = @"D:\DemoApplication\bin\Debug"; // Get the user token if (NativeWin32Methods.LogonUser(userPart, domainPart, password, (int)LOGON_TYPE.LOGON32_LOGON_BATCH, (int)LOGON_PROVIDER.LOGON32_PROVIDER_DEFAULT, out hToken)) { // Create structs SECURITY_ATTRIBUTES saProcessAttributes = new SECURITY_ATTRIBUTES(); SECURITY_ATTRIBUTES saThreadAttributes = new SECURITY_ATTRIBUTES(); // Now create the process as the user if (!NativeWin32Methods.CreateProcessAsUser(hToken, appPath, commandLine, ref saProcessAttributes, ref saThreadAttributes, false, 0, IntPtr.Zero, lpCurrentDirectory, ref si, out pi)) { // Throw exception throw new Exception("Failed to CreateProcessAsUser"); } } If you can tell me the modified one i would be very much thank ful to you. Prasad.

    C# help csharp design tutorial

  • Issue Launching UI Application from windows service in c# Windows
    P platso_588

    I Thank you for your awesome reply. It helped me and it worked out. As u told that this option cannot be implemented in Vista. I will tell you my requirement which is, I have a USB Device, when ever it is plugged in i need to Open my Application(.exe). It is just like iTunes Application for iPod. I have code for Detecting my USB Device. So i thought of implementing the device detecting code in windows service and if the device is found i can launch my application. Can you tell me any work around or any other way to Implement this senario so that it will work even in Vista. Regards, Prasad.

    C# help csharp design tutorial

  • Issue Launching UI Application from windows service in c# Windows
    P platso_588

    I am getting problem when i launch a UI Application from windows Service Application. My requirement is while starting up of the service i need to run a UI Application.for Example i have taken notepad.exe. The below code is the code i have implemented to run the process. Process p = new Process(); p.StartInfo.FileName = @"C:\WINDOWS\system32\notepad.exe"; bool bretval = p.Start(); Problem here is: It is running the process(notepad.exe) in background. I am not able to see it. I have gone through several Articles and i felt that WINDOWS service will supress the UI. Is there any Work around or any other Option so that my requirement can be obtained. Pls help me in this regard.

    C# help csharp design tutorial

  • Trouble calling cpp dll function whose input is char** [modified]
    P platso_588

    Hello, I am Developing a C# WINDOWS application. In my Application i need to call a cpp dll which returns the list of Drives connected to the PC. The Function is "int GetDeviceDiskName(char**);". I can get all the drive names in my vc++ application after i call this function. char *device[10]; for(int i = 0; i < 10; i++) { device[i] = new char[10]; memset(device[i],0,10); } int nRes = GetDeviceDiskName(device); device returns all the USB's attached to the PC. But I have Trobule calling this function in C#.Net. In my c# code i have declared the function in this manner, [DllImport("../../Hanlin.dll", SetLastError = true, CharSet = CharSet.Ansi,CallingConvention = CallingConvention.Cdecl)] public static extern Int32 GetDeviceDiskName(String[] deviceName); In c# i tried to call this function in this way, char[] deviceName = new char[10]; int nStatus = GetHanlinDeviceDiskName(ref deviceName); But I get Error as "Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Can some one help me how to call this function. In the Dll file the "device" array will be updated in this way, if(bDiskFound) { device[cnt][0]=cDiskID; cnt++; }

    modified on Thursday, October 8, 2009 9:09 AM

    C# csharp c++ help data-structures performance

  • IE 7 Focus Issue
    P platso_588

    Hello All, I am in the way of developing a web-chat application. In my ASP.Net application i am using AJAX. In my application first the user will login and can navigate through the page. If he like to chat then he need to click on a link, then a small ASPX Page will be opened. This will be opened via JAVA Script function named "window.open()". In this chat window i used AJAX and this will refresh for every 5 seconds. Normally the focus in the chat window will be on the text area in which the text will be entered. Even i followed the same trend. Just think the Textbox id is "TB_ToSend". In this chatwindow i have given "defaultfocus" as "TB_ToSend" and for every AJAX refresh in the OnTimer Function i have given "ScriptManager1.SetFocus(TB_ToSend);" where ScriptManager1 is the ScriptManager id. But i face a problem here in IE 7 when i click on the Parent window when the chat window is open(commonly we do it when we like to switch between windows) ,then after 5 seconds the chat window will popup and i lose focus on the parent Window(due to the focus i set in AJAX timer). This is not the expected behaviour, the expectation is that the focus need to be on the Parent window. This Issue doesnot occur in FireFox. Can anyone give me sugession to overcome this or is there any other way to set the focus.

    ASP.NET help csharp java asp-net tools

  • Focus Issue Due to AJAX Refresh
    P platso_588

    Hello, In my ASP.Net application i am using AJAX. Basically i am implementing Chat Application. At a time many chat windows will be opened and based on the AJAX time interval messages will be updated in the chat screen. My problem is i have set default focus as the Textbox and the text box is inside AJAX Panel. for every ajax refresh in each chat window the setfocus functionality is being called and all the windows are interchanging unnecessarily. From java script i want to know weather the current page is active or not,if it is active then the focus need to be on the textbox if the current page is not active the focus should not be on the textbox. can any one help me in this regard. Prasad.

    ASP.NET help csharp java asp-net tools

  • Ajax Refresh Without Timer
    P platso_588

    Hello, I am Developing a Web-Chat Application using ASP.Net with c# language. For chat window updation I am using AJAX Panel and updation happen for every 1 second as the Timer control Interval given in Timer is 1 Second. Updation code is implemented in Timer_Tick(). I feel is for every frequent time interval updation happens which can cause unnecessary load on the server. Basically for chat application only when send button is clicked updation is needed. I feel AJAX Refresh is not needed when the user is idle i.e when the user doesn't click on send button. My Query is it possible to refresh all the webpages of this particular link opened in different PC's when any user clicks on Send Button. What can i do for similar Implementation. If my query is not clear please feel free to ask questions.

    ASP.NET csharp asp-net database sysadmin lounge

  • Web Chat Implementation Approach
    P platso_588

    Hello, I want to develop a web chat application. In this application the user Just need to login to the webpage and can be able to chat with the other users who are logged in at that point of time. This application that i want to develop resembles GTalk that we can use once we sign in to or gmail account. This application is completely web application which doesn't need any installation. I need to develop this application in ASP.Net. In future this application can be enhanced with Remote Desktop viewing as well. ->Can any one suggest me the approach(logic of exchanging data between 2 users) and the technology that I can Implement so that i will not stuck in future. I don't need Code, just outline flow of implementation will satisfy my need. ->If you have any Idea how Web based GTalk was Implemented? I mean the approach the followed by Google. Please help me in this Regard.

    ASP.NET help csharp asp-net question lounge

  • How to Interop 2D char in c#
    P platso_588

    If you don't mind could you please provide me the code snippet for the above.

    C# c++ com csharp data-structures help

  • How to Interop 2D char from COM function in c#
    P platso_588

    I have written a COM DLL which gives the out parameter as BSTR**(Typically 2D Char Array). This COM function will fill the values of BSTR** variable. I am able to use this function sucessfully in MFC Application. But I face problem in using it in C#. The Sample code is as follows: ///////////COM Function//////////////////////////////////////// STDMETHODIMP CSampleTest::GetAllDeviceList2(BSTR** szMaclist) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); for(int i=0;i<10;i++) { szMaclist[i] = new BSTR[100]; wchar_t *szTmp = new wchar_t[100]; wsprintf(szTmp,L"Device%d",i+1); *szMaclist[i]=SysAllocString(szTmp); } return S_OK; } /////////////////////////////////////////////////////////////// I acessed this in VC++ by, BSTR **szMaclist = new BSTR*[10]; CoInitialize(NULL); HRESULT hr = CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,iid,(void**)&pText); if( SUCCEEDED(hr) ) { pText->GetAllDeviceList2(szMaclist); pText->Release(); } and i am sucessful in acessing this function in MFC Application. Can anyone tell me how to acess GetAllDeviceList2() function in c#.

    COM c++ com csharp data-structures help

  • How to Interop 2D char in c#
    P platso_588

    I have written a COM DLL which gives the out parameter as BSTR**(Typically 2D Char Array). This COM function will fill the values of BSTR** variable. I am able to use this function sucessfully in MFC Application. But I face problem in using it in C#. The Sample code is as follows: ///////////COM Function//////////////////////////////////////// STDMETHODIMP CSampleTest::GetAllDeviceList2(BSTR** szMaclist) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); for(int i=0;i<10;i++) { szMaclist[i] = new BSTR[100]; wchar_t *szTmp = new wchar_t[100]; wsprintf(szTmp,L"Device%d",i+1); *szMaclist[i]=SysAllocString(szTmp); } return S_OK; } /////////////////////////////////////////////////////////////// I acessed this in VC++ by, BSTR **szMaclist = new BSTR*[10]; CoInitialize(NULL); HRESULT hr = CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,iid,(void**)&pText); if( SUCCEEDED(hr) ) { pText->GetAllDeviceList2(szMaclist); pText->Release(); } and i am sucessful in acessing this function in MFC Application. Can anyone tell me how to acess GetAllDeviceList2() function in c#.

    C# c++ com csharp data-structures help
  • Login

  • Don't have an account? Register

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