From: JSW Date: 2005-11-05T07:22:09+09:00 Subject: Re: In an extension, doing a Data_Make_Struct and getting value back A snippet of the code around the Get and Make parts: ..... SQLHANDLE hDb; VALUE retVal; handle hCon; VALUE conRet; sConnect *sC; conRet = Data_Make_Struct(cDB2Conn, sConnect, 0, free, sC); sC->connection = hDb; return conRet; and the later part where it's used: handle *hCon; Data_Get_Struct( conHandle, handle, hCon ); This is where it fails with "incorrect class - Data expected" Does this give anyone an additional thought? Scott Walton "Phil Tomson" wrote in message news:dkeqlq018mr@enews2.newsguy.com... > In article , > JSW wrote: >>I have done Data_Make_Struct(klass, c-type, 0, free(), c_var*) and now I >>want to get the data back so I do a Data_Get_Struct( ruby_Var, c-type, >>c_var*) and it says that its the wrong type it's "klass" and should be >>"Data". >> >>I know I'm missing a very important (probably simple) step here, but I >>can't >>figure out what it is. >> >>Anyone have a clue? >> > > Could you post the actual code? > > I notice above that you have: > Data_Make_Struct(klass, c-type, 0, free(), c_var*) > > Whereas the pickaxe says it should be: > Data_Make_Struct(klass, c-type, 0, free(), c_type*) > > Not sure if that's an issue or not... > > Phil