Click here to Skip to main content
15,889,863 members
Home / Discussions / C#
   

C#

 
GeneralRe: Itembackground Color in ListBox Pin
Heath Stewart13-Feb-04 12:32
protectorHeath Stewart13-Feb-04 12:32 
GeneralRe: Itembackground Color in ListBox Pin
Snowjim13-Feb-04 14:27
Snowjim13-Feb-04 14:27 
GeneralRe: Itembackground Color in ListBox Pin
Heath Stewart13-Feb-04 16:48
protectorHeath Stewart13-Feb-04 16:48 
GeneralInterfaces Pin
MrJJKoolJ13-Feb-04 7:21
MrJJKoolJ13-Feb-04 7:21 
GeneralRe: Interfaces Pin
Heath Stewart13-Feb-04 12:29
protectorHeath Stewart13-Feb-04 12:29 
GeneralRe: Interfaces Pin
MrJJKoolJ13-Feb-04 12:34
MrJJKoolJ13-Feb-04 12:34 
GeneralImplementing IDropTargetInterFace in C# Pin
vnutheti13-Feb-04 6:35
vnutheti13-Feb-04 6:35 
GeneralRe: Implementing IDropTargetInterFace in C# Pin
Heath Stewart13-Feb-04 12:20
protectorHeath Stewart13-Feb-04 12:20 
For one, you don't need to ref the IDropTarget in RegisterDragDrop - it's already a reference Type so passing an instantiated instance. This could be one of the problems.

Second, in your IDropTarget, are you using the IDataObject defined in the .NET base class library, or an interop'd one that you'd have to define like you are with IDropTarget. Though the OLE interfaces are used internally by .NET, the IDropTarget interfaces are vastly different.

As far as the error, returning int should be no problem. An HRESULT is a 32-bit signed integer. Preserving the signatures of all the IDropTarget methods isn't necessary, either. This really is only helpful if you need to return a success code that isn't S_OK (0). Even in this case, though, you can always throw a COMException with the error code (or success code), which is the correct way (at least for errors). This can provide additional information to the caller if they support IErrorInfo. This behavior is provided in part by the CLR.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Implementing IDropTargetInterFace in C# Pin
vnutheti13-Feb-04 13:44
vnutheti13-Feb-04 13:44 
GeneralRe: Implementing IDropTargetInterFace in C# Pin
Heath Stewart13-Feb-04 16:46
protectorHeath Stewart13-Feb-04 16:46 
GeneralRe: Implementing IDropTargetInterFace in C# Pin
vnutheti14-Feb-04 8:06
vnutheti14-Feb-04 8:06 
GeneralUsing and intercepting command line programs Pin
noahfields13-Feb-04 6:00
noahfields13-Feb-04 6:00 
GeneralRe: Using and intercepting command line programs Pin
Kentamanos13-Feb-04 7:12
Kentamanos13-Feb-04 7:12 
GeneralRe: Using and intercepting command line programs Pin
noahfields14-Feb-04 4:05
noahfields14-Feb-04 4:05 
GeneralDataset and Recordset Pin
ASGill13-Feb-04 5:11
ASGill13-Feb-04 5:11 
GeneralRe: Dataset and Recordset Pin
Heath Stewart13-Feb-04 5:28
protectorHeath Stewart13-Feb-04 5:28 
GeneralControlling Panels via RadioButtons Pin
srt713-Feb-04 4:47
srt713-Feb-04 4:47 
GeneralRe: Controlling Panels via RadioButtons Pin
Heath Stewart13-Feb-04 5:32
protectorHeath Stewart13-Feb-04 5:32 
Generaldocked controls snapping to grid in compiled app Pin
Nathan Ridley13-Feb-04 4:16
Nathan Ridley13-Feb-04 4:16 
GeneralRe: docked controls snapping to grid in compiled app Pin
leppie13-Feb-04 19:14
leppie13-Feb-04 19:14 
GeneralRe: docked controls snapping to grid in compiled app Pin
Nathan Ridley14-Feb-04 0:06
Nathan Ridley14-Feb-04 0:06 
AnswerRe: listView - is there a bug? Pin
thomasa13-Feb-04 1:54
thomasa13-Feb-04 1:54 
GeneralRe: listView - is there a bug? Pin
Andy H13-Feb-04 3:16
Andy H13-Feb-04 3:16 
GeneralRe: listView - is there a bug? Pin
Heath Stewart13-Feb-04 3:50
protectorHeath Stewart13-Feb-04 3:50 
GeneralRe: listView - is there a bug? Pin
Andy H13-Feb-04 9:55
Andy H13-Feb-04 9:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.