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
S

sandeepkavade

@sandeepkavade
About
Posts
53
Topics
38
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Unable to register 64 bit COM Server
    S sandeepkavade

    Hi, I am trying to create a 64 bit COM server in visual studio 2008 on win7 x64 machine. Here are the steps I am following: 1. Open Visual Studio. 2. Create ATL Project 3. On ATL Project wizard in application settings select Executable(EXE) then Finish 4. Then Build->Configuration Manger change Platform to x64 5. Build the project. 6. On output window everything seems ok but if I take a look at buildLog.htm then there is a error 'errro PRJ0019: A tool returned an error code from "Performing registration"'. Even I tried to register from command prompt (with admin rights) but it is not registering. Neither error message nor success message.

    COM csharp c++ visual-studio com sysadmin

  • Problem registering 64 bit COM server
    S sandeepkavade

    Hi, I am trying to create a 64 bit COM server in visual studio 2008 on win7 x64 machine. Here are the steps I am following: 1. Open Visual Studio. 2. Create ATL Project 3. On ATL Project wizard in application settings select Executable(EXE) then Finish 4. Then Build->Configuration Manger change Platform to x64 5. Build the project. 6. On output window everything seems ok but if I take a look at buildLog.htm then there is a error 'errro PRJ0019: A tool returned an error code from "Performing registration"'. Even I tried to register from command prompt (with admin rights) but it is not registering. Neither error message nor success message.

    Visual Studio help csharp c++ visual-studio com

  • Problem with multirow selection in DataGridView control
    S sandeepkavade

    Hi, I have a DataGridView control on a form. It as one DataGridViewComboBoxColumn column. DataGridView control is not bound to any datatable or collection. I am populating it manually. Suppose DataGridViewComboBoxColumn has items 'CCW' and 'CW'. User can select either of these. While closing the form I am just reading the column values. So for its fine till MultiSelect is set to False. I want to change DataGrid's behavior to multi select row. User can select multiple rows and change the property to 'CW' or 'CCW' and it should get applicable to all the selected rows in the grid. How I can achieve it?

    C# css help question

  • How to disable event handler from its execution
    S sandeepkavade

    I have not attached the handler more than once. After first click the button is disabled for 3 seconds when I click on the disabled button somewhere it is queuing that event and after execution of first event handler it is calling that event handler again that I don't want as I clicked on disabled button. I don't know how to attach the file here. PM provide me your email id I'll send you the test application I created to reproduce the problem.

    C# csharp help tutorial question

  • How to disable event handler from its execution
    S sandeepkavade

    Tried that also. The problem is that the event handler is getting called after first execution and at the end of it I am setting this.button1.Enabled = true; so this is not going to solve my problem..

    C# csharp help tutorial question

  • How to disable event handler from its execution
    S sandeepkavade

    Tried but no success still the same behavior The event handler now looks like this: private void button1_Click(object sender, EventArgs e) { this.button1.Enabled = false; this.button1.Click -= new System.EventHandler(this.button1_Click); System.Threading.Thread.Sleep(3000); i++; this.label1.Text = "Total Calls: " + i.ToString(); this.button1.Enabled = true; this.button1.Click += new System.EventHandler(this.button1_Click); } still count is increasing if I click disabled button

    C# csharp help tutorial question

  • How to disable event handler from its execution
    S sandeepkavade

    Hi I am having button on form in C#. It does take 2-3 seconds to complete the operation meanwhile the button is disabled. But if the user clicks on that button when it is disabled, after completion of first operation it will again try to execute the handler again. how should I avoid the execution of event handler when the button is disabled? here is the code snippet: public partial class Form1 : Form { int i = 0; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { this.button1.Enabled = false; System.Threading.Thread.Sleep(3000); i++; this.label1.Text = "Total Calls: " + i.ToString(); this.button1.Enabled = true; } } when the button is disabled and you click on it, you can see the count gets increased. Please help

    C# csharp help tutorial question

  • Problem with PropertyGrid
    S sandeepkavade

    Hi, I am basically a VC++ developer but now working on C#. I am having a assembly in that i have added a UserControl and on that UserControl I am having a tree-view control and Property Grid control. As and when user selects the different nodes I am populating the corresponding properties in that grid. For the normal properties its working perfectly. But when I have to choose the property from the drop-down list. Its creating the problem. Whenever I click on the drop-down arrow nothing happens. So I created a test application. Took a windows form application added property grid, added a class deriving it from StringConverter. Everything works fine in test application. But I don't know why its failing in my production code. I debugged both codes. In test application whenever I click on the drop-down arrow call is coming inside GetStandardValues function. But this is not happening in my main code, its not hitting the break-point at all. Can anybody tell me why this is happening, Where I am going wrong? the test application code is below. The exact code is present in my main code namespace PropertyPage { class MyProperties:StringConverter { private double str1; private string str2; private string str3; public override bool GetStandardValuesSupported(ITypeDescriptorContext context) { //return base.GetStandardValuesSupported(context); return true; } public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) { //return base.GetStandardValuesExclusive(context); return true; } public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { return new StandardValuesCollection(new string[] { "Entry1", "Entry2", "Entry3" }); } [CategoryAttribute("Task "), DescriptionAttribute("test"), TypeConverter(typeof(MyProperties))] public string Str3 { get { return str3; } set { str3 = value; } } [CategoryAttribute("Task "), DescriptionAttribute("test"), ReadOnly(true)] public double Str1 { get { return str1; } set { str1 = value; } } [Editor(typeof(System.Windows.Forms.Design.FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))] public string Str2 { get { return str2; } set { str2 = value;

    C#

  • How to create gif file from bmp using GDI+
    S sandeepkavade

    Hi I am having 10 bmp files and i want to make 1 gif file out of that using GDI+. Each bmp file should be displayed for particular time period. I searched a lot but unable to find the answer. I want to do it in C++.

    Graphics c++ winforms graphics tutorial

  • ImpersonateLoggedOnUser() on Vista 64?
    S sandeepkavade

    Hi all, I am facing a strang problem for ImpersonateLoggedOnUser() on Vista 64. I am having a service and it internally launches a dll and that dll impersonates to paricular domain user. The code works perfect on XP, 2k3, vista 32, XP 64. But on vista 64 the service crashes. Does anybody have any idea why it might be creashing? Even i am not able to remote debug it. For remote debugging i put a message box in the dll whenever it pops up i remotely attach to that process and click on the message box for debugging. But on vista i cant see any message box. So how should i remote debug the code on vista 64?

    C / C++ / MFC debugging help question

  • LogOnUser fails on Win 2k
    S sandeepkavade

    Hi, I am trying to impersonate a user on Win 2k machines. The LogOnUser() api works perfect on XP, 2k3 but it fails on win 2k machines as it requires SE_TCB_NAME privilege. So i tried to set the privilege to the current process by the code available on MSDN http://msdn.microsoft.com/en-us/library/aa446619(VS.85).aspx[^] but it didnt work for me. still it fails by giving error 1314 (A required privilege is not held by the client), if i give the "Act as a part of operating system" privilege from Administrative tools -> local Security Policy -> Local Policy to that particular user, the code works perfectly on win 2k. But how to achive it through code. Thanks, Sandeep

    C / C++ / MFC visual-studio com security tools json

  • How to get the token for Logged in User?
    S sandeepkavade

    Hi i want to impersonate the process in SYSTEM, Logged in user and specified user. for Specified user i am giving the username and password and impersonation is working fine. The code is taken from http://msdn.microsoft.com/en-us/library/aa379608(VS.85).aspx[^]. The main process starts in SYSTEM account so by only using CreateProcess() api i can handle the case of SYSTEM user. But i am not finding any way to handle the logged in user case. How to get the token for logged in user? Any help in this context is really appreciated.

    C / C++ / MFC visual-studio com json help tutorial

  • Query regarding Registeration and Unregisteration of COM dll.
    S sandeepkavade

    Yps, i am running debug viewer and the logs say that its refering to the old path.

    COM c++ database com json performance

  • Query regarding Registeration and Unregisteration of COM dll.
    S sandeepkavade

    Sorry for delayed reply. As per your suggestion i checked the registry entries but i havent seen any problems in that they are getting updated before and after unregistering/registering.

    COM c++ database com json performance

  • Query regarding Registeration and Unregisteration of COM dll.
    S sandeepkavade

    I am using GetModuleFileName() as fallows. void GetModulePath(const TCHAR *strModuleName, CString &strModulePath) { TCHAR modulePath[_MAX_PATH]; HMODULE hModule = GetModuleHandle(strModuleName); if( hModule != NULL ) { GetModuleFileName(hModule, modulePath, _MAX_PATH); TCHAR* slashPos = _tcsrchr(modulePath, _TCHAR('\\')); if (slashPos != NULL) *slashPos = NULL; // Terminate the string here. strModulePath = CString(modulePath); } else { // DO ERROR HANDLING HERE CString strError; GetErrorText(GetLastError(), strError); // Log the error; } }

    COM c++ database com json performance

  • Query regarding Registeration and Unregisteration of COM dll.
    S sandeepkavade

    i am creating the object using CoCreateInstance(). but before that i am doing all the registeration and unregisteration. Does regsvr32 -u 'path' removes the dll from memory? i think thats what creating all problems?

    COM c++ database com json performance

  • Query regarding Registeration and Unregisteration of COM dll.
    S sandeepkavade

    hi all, i am having a COM dll and which is in memory. for unregistering it i use regsvr32 -u 'path'. and loaded the same dll from different location by regsvr32 'newpath'. All this i am doing through code in C++. But when i try to get the module path by calling GetModuleFileName() api it returns me the old path not the newly registered path. So is it because of the old dll is still in memory or something else and if its still in memory how to remove that from memory or am i missing something ???

    COM c++ database com json performance

  • Executing exe in others' user context???
    S sandeepkavade

    Hi, i want to execute a exe in other's context so i tried the following code HANDLE hUserToken; LogonUser(_T("username"),_T("domain"), _T("password"), LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, &hUserToken); STARTUPINFO startupInfo; memset(&startupInfo, '\0', sizeof(startupInfo)); startupInfo.cb = sizeof(startupInfo); startupInfo.dwFlags = STARTF_USESHOWWINDOW; startupInfo.wShowWindow = SW_SHOW; PROCESS_INFORMATION procInfo; memset(&procInfo, '\0', sizeof(procInfo)); BOOL b = CreateProcessAsUser(hUserToken, fileName.c_str(), NULL, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &startupInfo, &procInfo); DWORD dw = GetLastError(); } but i get the dw = 1314 saying "A required privilege is not held by the client." If i right click the exe and choose the run as option giving user name and password it works fine. but how to execute that through code? Where i am going wrong?

    C / C++ / MFC tutorial question

  • Removing COM dll from memory
    S sandeepkavade

    hi all, i have a dll say abc.dll loaded in memory and i have to unload abc.dll and load another dll of same name but it may differ in version number. i tried to unregister the first dll and register the second dll programatically. but still the code refers to the first dll. I think its because the first dll is still in memory. Am i right? Then how to completely remove the that dll from memory? I also renamed the first dll after unregistering it and then registered the second one. but it doesnt work.

    COM com performance tutorial question announcement

  • WMI Impersonation problem
    S sandeepkavade

    Hi, i want to get number of printers attached to my computer, i use Win32_printer class to get the printers, but before connecting WMI i impersonating to some other user. But the WMI gives the output not for the impersonated user but the one who has launched it. I am launching the process in system accout and trying to impersonate to the logged in user to get the printer information of the logged in user. (Initially i have to launch the process in system account) Does anybody has any idea how to do this??

    C / C++ / MFC help tutorial 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