TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Swapnil Joshi
NA
1
586
How to convert following code of C++ in C#
Mar 8 2016 12:16 AM
public:
virtual HRESULT GetOption(int SlotIndex)
{
HRESULT hr = S_OK;
CString strOpts;
CString Slot;
int Pos=0;
Slot.Format(_T("%d"), SlotIndex);
CString Module1 = "M" + Slot;
hr = io.QueryString(_T("DIAGnostic:SYSTem:MODule:PNUMber?"),strOpts);
strOpts.Remove('\"');
if(strOpts == "M8195A")
{
ModuleName = "M8195A";
}
else
{
hr = io.QueryString(_T("*OPT?"), strOpts);
if (SUCCEEDED(hr))
{
strOpts.Replace('\)', '\,');
strOpts.Remove('\(');
strOpts.Remove('\)');
strOpts.Replace('-', '.');
if(strOpts.Find(Module1) == -1)
{ModuleName = "";
return hr;}
else
{
Pos = strOpts.Find(Module1);
ModuleName = strOpts.Mid(Pos+3, 6);
}
}
}
return hr;
}
Reply
Answers (
1
)
error in MVC_PracticeEntities
Show busy notification on a button click during page load