Click here to Skip to main content
15,885,366 members
Home / Discussions / C#
   

C#

 
GeneralRe: Bitmap to byte array? Pin
thomasa8-Sep-05 21:34
thomasa8-Sep-05 21:34 
GeneralRe: Bitmap to byte array? Pin
Judah Gabriel Himango9-Sep-05 4:24
sponsorJudah Gabriel Himango9-Sep-05 4:24 
QuestionCryptographicException when instantiating RSACryptoServiceProvider Pin
mav.northwind8-Sep-05 2:35
mav.northwind8-Sep-05 2:35 
AnswerRe: CryptographicException when instantiating RSACryptoServiceProvider Pin
Ashok Dhamija8-Sep-05 4:00
Ashok Dhamija8-Sep-05 4:00 
GeneralRe: CryptographicException when instantiating RSACryptoServiceProvider Pin
mav.northwind8-Sep-05 5:01
mav.northwind8-Sep-05 5:01 
GeneralRe: CryptographicException when instantiating RSACryptoServiceProvider Pin
Ashok Dhamija8-Sep-05 18:36
Ashok Dhamija8-Sep-05 18:36 
AnswerRe: CryptographicException when instantiating RSACryptoServiceProvider Pin
mav.northwind8-Sep-05 20:28
mav.northwind8-Sep-05 20:28 
QuestionUsing Resources - Command Line Compile vs VS Compile Pin
MrEyes8-Sep-05 2:15
MrEyes8-Sep-05 2:15 
Hello all,

I am currently trying to convert a batch (CSC) compiled project into a VS 2003 solution, and I seem to be having a small problem with embedded resources.

This particular project uses the following batch arguments to compile (which works fine btw)

@echo off
if not exist lib   md lib
if not exist doc   md doc

if exist lib\Novell.Directory.Ldap.dll del lib\Novell.Directory.Ldap.dll

echo "Building resources..."
resgen Novell.Directory.Ldap\Novell.Directory.Ldap.UtilClass\ResultCodeMessages.txt lib\ResultCodeMessages.resources

resgen Novell.Directory.Ldap\Novell.Directory.Ldap.UtilClass\ExceptionMessages.txt lib\ExceptionMessages.resources

echo "Generating lib\Novell.Directory.Ldap.dll.."
csc /noconfig /w:1 /r:System.dll /target:library /resource:lib\ResultCodeMessages.resources
-> /resource:lib\ExceptionMessages.resources /doc:doc\comments.xml 
-> /out:lib\Novell.Directory.Ldap.dll  /recurse:Novell.Directory.Ldap\*.cs

del lib\ResultCodeMessages.resources
del lib\ExceptionMessages.resources


The problem I have is with the two resources generated above using the resgen tool. In my VS solution I have set both these files to be "embedded resources" but I get the following exception

{"Could not find any resources appropriate for the specified culture (or the neutral culture)
in the given assembly.  Make sure \"ResultCodeMessages.resources\" was correctly embedded or
linked into assembly \"LibLdap\".\r\nbaseName: ResultCodeMessages  locationInfo: <null>
resource file name: ResultCodeMessages.resources  assembly: LibLdap, Version=2.1.3.0,
culture=neutral, PublicKeyToken=null" }


When the following code is executed:

defaultResultCodes = new ResourceManager("ResultCodeMessages", Assembly.GetExecutingAssembly());
result = defaultResultCodes.GetString(Convert.ToString(code), defaultLocale);


A similar exception occurs when attempting to access the other resource.

I know this is simply that the code cannot find the resource, can anybody tell me how to embed it correctly?

post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42

-- modified at 8:19 Thursday 8th September, 2005
Questionhave some method in a exe file.but I want to use them in another project Pin
jzb8-Sep-05 0:28
jzb8-Sep-05 0:28 
AnswerRe: have some method in a exe file.but I want to use them in another project Pin
enjoycrack8-Sep-05 1:43
enjoycrack8-Sep-05 1:43 
AnswerRe: have some method in a exe file.but I want to use them in another project Pin
Daniel Grunwald8-Sep-05 3:47
Daniel Grunwald8-Sep-05 3:47 
AnswerRe: have some method in a exe file.but I want to use them in another project Pin
mav.northwind9-Sep-05 12:31
mav.northwind9-Sep-05 12:31 
QuestionCreating conditional windows application Pin
Fredy8-Sep-05 0:19
Fredy8-Sep-05 0:19 
AnswerRe: Creating conditional windows application Pin
Ashok Dhamija8-Sep-05 3:38
Ashok Dhamija8-Sep-05 3:38 
AnswerRe: Creating conditional windows application Pin
Patric_J8-Sep-05 6:13
Patric_J8-Sep-05 6:13 
Questionmy console application doesn't run on other pc Pin
Sasuko8-Sep-05 0:04
Sasuko8-Sep-05 0:04 
AnswerRe: my console application doesn't run on other pc Pin
Michael P Butler8-Sep-05 0:23
Michael P Butler8-Sep-05 0:23 
GeneralRe: my console application doesn't run on other pc Pin
Sasuko8-Sep-05 3:40
Sasuko8-Sep-05 3:40 
GeneralRe: my console application doesn't run on other pc Pin
Ashok Dhamija8-Sep-05 4:18
Ashok Dhamija8-Sep-05 4:18 
Questionhow can i get filed from C3 Form to Crystal Pin
Anonymous7-Sep-05 23:59
Anonymous7-Sep-05 23:59 
QuestionDataGrid.DataSource customization Pin
Corax7-Sep-05 23:55
Corax7-Sep-05 23:55 
QuestionHow 2 select best display resolution? Pin
majidbhutta7-Sep-05 23:01
majidbhutta7-Sep-05 23:01 
AnswerRe: How 2 select best display resolution? Pin
Dave Kreskowiak8-Sep-05 1:53
mveDave Kreskowiak8-Sep-05 1:53 
QuestionProblem with ParameterInfo in System.Reflection Pin
israfel7-Sep-05 22:56
israfel7-Sep-05 22:56 
AnswerRe: Problem with ParameterInfo in System.Reflection Pin
israfel8-Sep-05 0:36
israfel8-Sep-05 0:36 

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.