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
C

callousfantom

@callousfantom
About
Posts
22
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Help regarding hosting/Development server?
    C callousfantom

    Hi, As already pointed out, I was asking if it could be accessed from the development server itself. If not, can anyone guide me as to how to host it on IIS 7(windows vista). I have never hosted a website and am absolutely clueless. My website is built in Visual Studio 2008. I Installed IIS 7. Added my website folder to inetpub/wwwroot, converted it to Application inside the "Default website" as I read in an article and even created an Application Pool and assigned it to my website but it keeps throwing different sorts of errors.PLEASE HELP. ITS URGENT! :((

    modified on Thursday, February 18, 2010 12:20 AM

    .NET (Core and Framework) sysadmin windows-admin hosting help question

  • Help regarding hosting/Development server?
    C callousfantom

    Hi, I have a webapp on my filesystem that will eventually be deployed somewhere else where IIS obviously exists. For now is it possible for my webapp to be made accessible from other systems on the LAN without hosting it on IIS? I mean can it be accessed from the development server itself? Something like: http://10.x.x.x:port_number/MyWebAppName I mean if I unblock the port in my firewall. Kindly advise. I just need to get it up and running for a demo.

    .NET (Core and Framework) sysadmin windows-admin hosting help question

  • Help with multiple dropdownlists and updatepanels
    C callousfantom

    Hi, I'm developing a user control that is loaded dynamically into a page. The user control has 4 dropdownlists(DDLs). Each is populated dynamically depending upon the values selected in the previous DDLs. Each DDL is in a separate updatepanel (not nested) and has the autopostback set true. Each has its trigger set as the SelectedIndexChanged event of the DDL before it. The problem is, if the user selects a (non default) selection 'x' in the first DDL and tries to select something say 'p' in DDL2, on postback, SelectionChangedEvent for DDL1 is fired (as per normal page lifecycle) to select 'x' which reloads DDL2 before SelectionChangedEvent of DDL2 is fired. This causes the selected 'p' in DDL2 to be lost and the page comes back again with the default selection for DDL2. Similar is the case with other DDLs. Here's the logic of my code: Page_Load() { //Load DDL1 } UpdatePanel2_Load() { //Load DDL2 } UpdatePanel3_Load() { //Load DDL3 } UpdatePanel4_Load() { //Load DDL4 } OnSelectedIndexChanged_DDL1() { //Load DDl2,DDL3,DDL4 } OnSelectedIndexChanged_DDL2() { //Load DDL3,DDL4 } OnSelectedIndexChanged_DDL3() { //Load DDL4 } What this does is, when OnSelectedIndexChanged_DDL1() is fired on postback to select 'x' in DDL1, it reloads DDL2,DDL3,DDL4 and by the time OnSelectedIndexChanged_DDL2() is fired (because of the selection 'p' made by user) the statement 'DDL2.SelectedValue' inside it only returns the default DDL2 selection 'd' and not the user selection 'p'. Can I get the value selected by the user in Page_Load itself (say from Viewstate) instead of waiting for OnSelectedIndexChanged_DDL2() to fire? I know it's really long and might seem confusing but I really need a solution to this and am losing my mind! :) Any help would be great. Thanks

    ASP.NET help database question

  • Help with Crystal Reports [modified]
    C callousfantom

    Hi. I'm rather new to asp.net and even more so in crystal. Basically this is the first time I'm using this. What I need to do is prepare a report from a dynamically created dataset(untyped if you will). I have read a lot of articles online but haven't been able to make it work. Basically the table that i want to display in crystal doesn't exist in database and was created programmatically as a DataTable The data simply doesn't display.Here's the code in codebehind: Protected Sub CrystalReportViewer1_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Init Dim rpt As New ReportDocument rpt.Load(Server.MapPath("CrystalReport1.rpt") rpt.SetDataSource(dset.Tables("Tab1")) CrystalReportViewer1.ReportSource = rpt CrystalReportViewer1.DataBind() End Sub Please note that the dataset is populated correctly as i can see it in a gridview. CrystalReport1.rpt uses the same schema as Tab1 but using a dataset included at design time called "DataSet1". Here is the code for how this dataset was created: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim mysqlDad As MySqlDataAdapter Dim mysqlConn As MySqlConnection Dim query As String = "" 'some select query that returns 2 rows. Dim connstring As String = "Database=ocsweb;Data Source=10.135.158.160;User Id=abc;Password=abc" dset = New DataSet("Home") dset.ReadXmlSchema(Server.MapPath("~\App_Code\DataSet1.xsd")) mysqlConn = New MySqlConnection(connstring) mysqlDad = New MySqlDataAdapter(query, mysqlConn) mysqlDad.Fill(dset, "Tab1_tmp") Dim Dt As New DataTable("Tab1") Dim col1 As New DataColumn("Unchecked") Dim col2 As New DataColumn("Checked") Dt.Columns.Add(col1) Dt.Columns.Add(col2) Dim dr As DataRow = Dt.NewRow() dr.Item(0) = dset.Tables("Tab1_tmp").Rows(0).Item(0) dr.Item(1) = dset.Tables("Tab1_tmp").Rows(1).Item(0) Dt.Rows.Add(dr) dset.Tables.Add(Dt) catch ex as exception msgbox(ex.message) end try If there is something else that can/needs to be done, please let me know. I'm very new and could surely use some help here. :(

    modified on Friday, August 28, 2009 6:18 AM

    ASP.NET database csharp asp-net design sysadmin

  • Help with custom message broadcasting(Inter process communication)
    C callousfantom

    hmm..and did you make your service interactive or not? By the way, did you look at the code that I had posted, the one using global events? Just to be sure I did it right.

    C / C++ / MFC c++ csharp help question

  • Help with custom message broadcasting(Inter process communication)
    C callousfantom

    Hi thanks for all the advice. I've managed to take care of it. I had to make the service interactive in order to make my application visible to it and I found no other way of making it visible due to the different user contexts. So you were right:) But one thing that I haven't quite understood is, why didn't events work? I mean a "Global" event should not be hindered by contexts/sessions right? But even the global events raised by the service were not visible to my application. Can you explain?:confused:

    C / C++ / MFC c++ csharp help question

  • Broadcasting custom windows message(Interprocess communication)
    C callousfantom

    Hi thanks for all the advice. I've managed to take care of it. I had to make the service interactive in order to make my application visible to it and I found no other way of making it visible due to the different user contexts. So you were right :-O

    .NET (Core and Framework) c++ csharp help question

  • Help with custom message broadcasting(Inter process communication)
    C callousfantom

    Well, here's the thing. 1.I'm able to communicate from the app. to the service using the ControlService function but not the other way around. 2.You say that it is only valid for a session. But as you can see I've used RegisterWindowMessage in the service as well as app.(to get the same SYSTEMWIDE unique -that's what msdn says- value for my message both inside the service and the app.) So if the app is reloaded from another user's context the app will gather the value of the message again. 3.I've even had the values displayed in both my service and app and they are the same. Thus the message is definitely unique and visible to both. 4.I even printed a log of all the messages recvd by wndproc of the app but the broadcasted msg never reaches the wndproc despite being successfully broadcasted from the service. As for your idea of using named events, I did that and again the same issue was encountered. The service says that the event was set but the application never captures the event. Just to confirm, while using CreateEvent I still do need to follow the escaping conventions right? i.e I used CreateEvent(NULL,0,0,"Global\\my_message") in the service and CreateEvent(Nothing,0,0,"Global\my_message") in the app.(since vb.net doesn't need to escape backslash) Here's the code: HANDLE MY_EVENT=CreateEvent(NULL,false,false,"Global\\my_message"); SetEvent(MY_EVENT); In vb.net: Const SYNCHRONIZE As Integer = &H100000L Dim MY_EVENT As Integer Private Declare Function OpenEvent Lib "kernel32" Alias "OpenEventA" (ByVal dwDesiredAccess As Long, ByVal inheritHandle As Integer, ByVal lpName As String) As Integer Private Declare Function WaitForSingleObject Lib "kernel32" Alias "WaitForSingleObject" (ByVal hHandle As Integer, ByVal dwMilliseconds As Integer) As Integer Sub New() InitializeComponent() Me.TopLevel = True Try my_event_thread = New Thread(AddressOf MyEventWatcher) Catch ex As Exception MsgBox("Error in initializing! " + ex.Message) Application.Exit() End Try End Sub Private Sub MyEventWatcher() Try MY_EVENT = OpenEvent(SYNCHRONIZE, 1, "Global\my_message") While True WaitForSingleObject(MY_EVENT, INFINITE) MsgBox("Done") End While Catch ex As Exception MsgBox("Exception:" + ex.Message) End Try End Sub What should I do now?Any ideas?:confused: Thanks for the help! <

    C / C++ / MFC c++ csharp help question

  • Broadcasting custom windows message(Interprocess communication)
    C callousfantom

    Are you trying to say that since the service (SYSTEM acct) is running under a different user context than the application, that the messages won't reach the application from the service? Because my application can communicate via messages with my service using its handle.I've already done that. This implies I can only communicate from the app. to the service and not the other way around. Or does it mean that I can only use handles to communicate one-to-one and broadcasting won't work? Neither of the two seem to make sense to me. As for another way, I could use custom named events but I've already done one way via messages and I thought I could do the same thing in the other direction. If there's something else you were trying to suggest then I'm sorry I don't think I quite understood you.:confused:

    .NET (Core and Framework) c++ csharp help question

  • Broadcasting custom windows message(Interprocess communication)
    C callousfantom

    Thanks for the suggestion but I tried it and it didn't really work. I don't think it's a security issue. I doubt that.

    .NET (Core and Framework) c++ csharp help question

  • Broadcasting custom windows message(Interprocess communication)
    C callousfantom

    Hi I have a service written in Visual C++ 6 that needs to interact with an application written in vb.net. In my service I have used : <b>DWORD mymsg=RegisterWindowMessage("my_message")</b> to register a unique custom message. I then use: <b>BOOL b=SendNotifyMessage(HWND_BROADCAST,mymsg,NULL,NULL)</b> to broadcast my message. However, I can't seem to be able to capture this message in the Windowproc function of my vb.net application. <b>Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Integer Dim mymsg As Integer = RegisterWindowMessage("my_message") Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) if m.Msg=mymsg then --do something-- end if end sub</b> Please help! :sigh: P.S.:I need to show a pop up in my .net application when it receives this message. The message values have all registered properly in both applications and are returned to be the same when I print them. Also the SendNotitfyMessage in my service returns a non zero value(supposed to indicate success). What do I do?? What am I doing wrong? Is there something wrong with my message receiving code in vb.net?

    .NET (Core and Framework) c++ csharp help question

  • Help with custom message broadcasting(Inter process communication)
    C callousfantom

    Hi I have a service written in Visual C++ 6 that needs to interact with an application written in vb.net. In my service I have used : DWORD mymsg=RegisterWindowMessage("my_message") to register a unique custom message. I then use: BOOL b=SendNotifyMessage(HWND_BROADCAST,mymsg,NULL,NULL) to broadcast my message. However, I can't seem to be able to capture this message in the Windowproc function of my vb.net application. Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Integer Dim mymsg As Integer = RegisterWindowMessage("my_message") Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) if m.Msg=mymsg then --do something-- end if end sub Please help! :sigh: P.S.:I need to show a pop up in my .net application when it receives this message. The message values have all registered properly in both applications and are returned to be the same when I print them. Also the SendNotitfyMessage in my service returns a non zero value(supposed to indicate success). What do I do?? What am I doing wrong?

    C / C++ / MFC c++ csharp help question

  • VC++ 6.0 SetupDiGetClassImageList query
    C callousfantom

    Yes it is an application error where it refers to some address claiming the memory could not be "read". However, if that statement is commented out all seems to run fine. So all I can conclude from this is that the problem lies in these 2 code statements of Attach and SetImageList functions. I really can't figure out what could possibly be causing this and am really close to giving up on the idea of adding images! Please Help!:confused: Exactly the error is as follows: The instruction at "0x00405652" referenced memory at "0x00000004".The memory could not be "read".

    modified on Friday, June 19, 2009 2:27 AM

    C / C++ / MFC c++ sharepoint database data-structures help

  • VC++ 6.0 SetupDiGetClassImageList query
    C callousfantom

    Hey, I've added all the code relevant to retreival of ImageList below. There is nothing other than this in my code. Please have a look and let me know what modifications it would require. Thanks!:) Code: PSP_CLASSIMAGELIST_DATA imageList={0};int imIndex; CImageList imList; imageList->cbSize=sizeof(SP_CLASSIMAGELIST_DATA); SetupDiGetClassImageList(imageList); imList.Attach(imageList->ImageList); m_Tree.SetImageList(&imList,TVSIL_NORMAL); /*devInfo is a valid SP_DEVINFO_DATA structure.I know this because the tree control shows the correct output(without any images though)*/ SetupDiGetClassImageIndex(imageList,&devInfo.ClassGuid,&imIndex); I later use imIndex to set the iImage property of TVITEM structure. This is node that is later inserted into the tree.

    C / C++ / MFC c++ sharepoint database data-structures help

  • VC++ 6.0 SetupDiGetClassImageList query
    C callousfantom

    Hi.Does anyone know how to cast an SP_CLASSIMAGELIST_DATA structure to CImageList class? Is it possible? I'm guessing it should be but can't seem to be able to do it. Actually I've retrieved an imagelist of all devices using SetupDiGetClassImageList function into a SP_CLASSIMAGELIST_DATA structure. I'm now trying to set it to be the imageList of my Tree Control that lists the devices. However due to these casting issues I get a runtime assertion error and my application crashes. Any ideas? I've tried the following methods but have failed with the same runtime error. Method 1: <i>PSP_CLASSIMAGELIST_DATA imageList; SetupDiGetClassImageList(imageList); <b>m_Tree.SetImageList((CImageList *)imageList->ImageList,TVSIL_NORMAL);</b></i> Method 2: <i>PSP_CLASSIMAGELIST_DATA imageList; CImageList imList; SetupDiGetClassImageList(imageList); <b>imList.Attach(imageList->ImageList); m_Tree.SetImageList(imList,TVSIL_NORMAL);</b></i> I have bolded the lines that are causing the crash.

    C / C++ / MFC c++ sharepoint database data-structures help

  • SetupAPI library:SetupDiGetDeviceRegistryProperty function issue (VC++ 6.0)!
    C callousfantom

    Thanks guys! I upgraded using the service pack 6 and used the latest SDK and that solved the problem:)

    modified on Wednesday, June 17, 2009 1:23 AM

    C / C++ / MFC help c++ tools question

  • SetupAPI library:SetupDiGetDeviceRegistryProperty function issue (VC++ 6.0)!
    C callousfantom

    Well it must be old since it is the setupAPI.h that originally came with VC++ 6.0.0.8167 in 1998. And I checked the setupAPI.h and it doesn't have SPDRP_INSTALL_STATE property defined in it. So what should I do? Should I download new setupAPI.h and setupAPI.lib files to replace the old ones? Wouldn't there be any compatibility issues then? Even the SetupDiGetClassDevsEx in this header uses 6 parameters instead of 7 as in the newer version. But it works fine so I didn't bother!

    C / C++ / MFC help c++ tools question

  • SetupAPI library:SetupDiGetDeviceRegistryProperty function issue (VC++ 6.0)!
    C callousfantom

    Hi, I'm fairly new to VC++ and I'm trying to develop a device manager type of utility.The problem I'm facing is with SPDRP_INSTALL_STATE property. Whenever I try to retreive this property I get the following error at compile time. error C2065: 'SPDRP_INSTALL_STATE' : undeclared identifier My syntax is: SetupDiGetDeviceRegistryProperty(dInfoSet,&devInfo,SPDRP_INSTALL_STATE,&dwT,(PBYTE)&dwIS,sizeof(dwIS),NULL); where dwIS and dwT are both DWORD. I also tried the following syntax: SetupDiGetDeviceRegistryProperty(dInfoSet,&devInfo,SPDRP_INSTALL_STATE,NULL,NULL,0,&reqSz); szBuf=(char *)malloc(reqSz); SetupDiGetDeviceRegistryProperty(dInfoSet,&devInfo,SPDRP_INSTALL_STATE,NULL,(unsigned char *)szBuf,reqSz,&reqSz); Both give the same compilation error.I should also like to point out that the latter snippet works with other properties like SPDRP_DEVICETYPE. I've hit a dead end because of this as I need to know if the device is working properly.Any ideas?? Do I need to use cfgmgr32.h ?(Although I doubt it) Please help :((

    C / C++ / MFC help c++ tools question

  • Visual C++ 6.0 SETUPAPI help! [modified]
    C callousfantom

    Thanks!:):thumbsup:

    C / C++ / MFC c++ help question debugging

  • Visual C++ 6.0 SETUPAPI help! [modified]
    C callousfantom

    I've also noticed something now. MSDN shows that SetupDiGetClassDevsEx accepts 7 parameters but I guess VC++6.0 uses an older version as the SetupAPI.h header file in the default path(~/VC98/include) accepts only 6 parameters. So I tried to use the header and lib files available with Windows DDK which has SetupDiGetClassDevsEx with 7 params. But the two seem incompatible as now it shows me 37 errors at compile time, all in the header SetupAPI.h. Any help about how to handle this?

    C / C++ / MFC c++ help question debugging
  • Login

  • Don't have an account? Register

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