No, I need an array of a structure inside another structure. StructLayout(LayoutKind.Sequential)] public struct s1 { [MarshalAs(UnmanagedType.I4)] public int val; } StructLayout(LayoutKind.Sequential)] public struct s2 { [MarshalAs(UnmanagedType.Struct, SizeConst=16)] public s1[] vals; } Something like that. Take a look at my original post.
GrindAZ
Posts
-
Marshalling Data, Can Anyone Help? -
Marshalling Data, Can Anyone Help?If you wanted a fixed array size of the Person structure how would you do it?
-
Marshalling Data, Can Anyone Help?I need to marshal a structure so that I can pass it to a C++ DLL and vice versa. The following works correctly: _ Private Structure PLCDATA Dim w1 As Int32 Dim w2 As Int32 Dim w3 As Int32 Dim b1 As Boolean Dim b2 As Boolean Dim Arr() As Int32 Sub initialize() ReDim Arr(4) End Sub End Structure Now I need to have another item in the structure be an array of a different structure. Hope that makes since. I thought this would work but it gives me an error: _ Private Structure PARCEL Dim Induct As Int32 Dim Dest As Int32 Dim Reason As Int32 End Structure _ Private Structure PLCDATA Dim w1 As Int32 Dim w2 As Int32 Dim w3 As Int32 Dim b1 As Boolean Dim b2 As Boolean Dim Arr() As Int32 Dim Items() As PARCEL Sub initialize() ReDim Arr(4) ReDim Items(2) End Sub End Structure The error I get looks like this: System.TypeLoadException: Can not marshal field Items of type PLCDATA: This type can not be marshaled as a structure field. at Test_PLCData.Form1.ReadFromPLC(PLCDATA& pRead) at Test_PLCData.Form1.Button1_Click(Object sender, EventArgs e) in C:\Esanti Code\C++\PLC_Data DLL\VB.NET Test App\Test PLCData\Test PLCData\Form1.vb:line 106 Can anyone tell me how to get this to work correctly? Thanks in advance!!!
-
Creating A Bitmap?I am using the MSChart Control from VB6 using COM Interop. I am creating a 3d line chart. I need to make a bitmap or GIF or whatever of this chart. Can anyone tell me how to do this? Maybe doing something like a Print Screen or something? Thank for any help!
-
datagridsYour Welcome.
-
datagridsIf you are just performing a new query and setting the results to the datagrid then in your routine where you set the datagrids datasource property, always set the datasource to nothing first. Private Sub FillGrid(dg As DataGrid) Dim ds As New DataSet '//Clear Any Data From The Grid dg.DataSource = Nothing '//Do Work To Get Data Here ' ' '//Fill The Grid With Data dg.DataSource = ds End Sub Just An Example. That way your really only had to add one line of code to clear the grid and scrollbar.
-
datagridsTake a look here http://www.syncfusion.com/FAQ/WinForms/FAQ\_c44c.asp#q895q or maybe try setting the current cell like this: Datarid.CurrentCell = New DataGridCell(0, 1)
-
DataGrid In ASP.NET Page?Yeah I didn't databind the grid. Thanks for the help.
-
DataGrid In ASP.NET Page?I am new to using ASP.NET although I have written several applications in VB.NET. I am trying to dispaly data from a database in a datagrid. I fill a dataset with data using a stored procedure from a SQL server database. I then set the datasource property of the datagrid equal to the dataset. The problem is the datagrid is never displayed on my page. the weird thing is the rowcount of the datagrid is correct. Any ideas?
-
Properties In A Web Service?Can you have public properties in a web service? I need to set some variables used inside the web service.
-
XP Style Password Box.Thanks for the info. It would be nice if you could access the same controls M$ uses. The XP Style password box displays a ballon tip when you turn CAPS Lock on and things like that.
-
XP Style Password Box.How do you get the .PasswordChar of a textbox to be the solid black cirlce like in XP windows?
-
DataSet Changes?I have a DataSet that gets it's data from a stored procedure. I then use that dataset to populate a datagrid. When the user makes changes to the datagrid or adds new rows, how can I update the database table with the affected rows? Is there a way to tell which rows in a dataset have been changed or added?
-
Random Colors?How can you generate random colors from the system.drawing.color structure? i.e. Color.Red Color.Blue Color.Green etc.
-
SQL QuestionIs there no way to do a SQL command like CREATE TABLE or something to copy this table?
-
Graphing Control?Does anyone know of any good free controls for creating pie charts?
-
Web Service?Here Is The Answer: Your problem lies in your machine.config file which will most likely be in the following directory: C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG The problem is that .NET 1.1 ships with HttpPost and HttpGet turned off. look for the following tags: You will notice that HttpPost and HttpGet are commented out. Uncomment them and it should fix your problem. Thanks, Kenton Smeltzer
-
Web Service?Here Is The Answer: Your problem lies in your machine.config file which will most likely be in the following directory: C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG The problem is that .NET 1.1 ships with HttpPost and HttpGet turned off. look for the following tags: You will notice that HttpPost and HttpGet are commented out. Uncomment them and it should fix your problem. Thanks, Kenton Smeltzer
-
SQL QuestionI have an empty table I set up as a Master table template. How can I copy this table and give it a new name using SQL? I have to create a new table each day so I just want to copy this template table I have.
-
Web Service?I created my first web service and accessing it from IE on the local machine works great. But when I try to access from another computer on the network I can see the definitions but cannot execute any of the functions? It says they are only avaiable to the local machine. How do I make it available for any machine?